Skip to content

Commit

Permalink
fix(plugin): set content-type header for serving index.html (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
d3lm authored May 6, 2022
1 parent 3adc43d commit 1656f03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export function createVitePressPlugin(
server.middlewares.use((req, res, next) => {
if (req.url!.endsWith('.html')) {
res.statusCode = 200
res.setHeader('Content-Type', 'text/html')
res.end(`
<!DOCTYPE html>
<html>
Expand Down

0 comments on commit 1656f03

Please sign in to comment.