mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 21:07:47 +00:00
[cli] add charset to content-type headers for vc dev (#9364)
Adds `charset: utf8` to the `content-type` header
This commit is contained in:
@@ -1129,10 +1129,10 @@ export default class DevServer {
|
||||
});
|
||||
body = `${json}\n`;
|
||||
} else if (accept.includes('html')) {
|
||||
res.setHeader('content-type', 'text/html');
|
||||
res.setHeader('content-type', 'text/html; charset=utf-8');
|
||||
body = redirectTemplate({ location, statusCode });
|
||||
} else {
|
||||
res.setHeader('content-type', 'text/plain');
|
||||
res.setHeader('content-type', 'text/plain; charset=utf-8');
|
||||
body = `Redirecting to ${location} (${statusCode})\n`;
|
||||
}
|
||||
res.end(body);
|
||||
|
||||
Reference in New Issue
Block a user