fix(plugin): set content-type header for serving index.html (#616)

pull/615/head
Dominic Elm 3 years ago committed by GitHub
parent 3adc43d00a
commit 1656f0365a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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>

Loading…
Cancel
Save