From 945f741298f54540531b1c4370ab786b5a78f107 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Thu, 24 Dec 2020 14:46:39 -0800 Subject: [PATCH] fix(site): ensure "text/plain" on error response (#5821) - Closes #5820 --- site/src/server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/src/server.js b/site/src/server.js index c7cf93c3b5..6990d94265 100644 --- a/site/src/server.js +++ b/site/src/server.js @@ -10,7 +10,9 @@ const app = polka({ onError: (err, req, res) => { const error = err.message || err; const code = err.code || err.status || 500; - res.headersSent || send(res, code, { error }); + res.headersSent || send(res, code, { error }, { + 'content-type': 'text/plain' + }); } });