diff --git a/src/server/utils.js b/src/server/utils.js index 8b13d377..6fe423d6 100644 --- a/src/server/utils.js +++ b/src/server/utils.js @@ -348,6 +348,20 @@ window.LiveReloadOptions = { .send(textBody); return; } + if (ret.status === 401) { + let textBody = await ret.text(); + textBody = ` + +

${textBody}

+ +`; + respHeaders['content-type'] = 'text/html'; + res + .set(respHeaders) + .status(ret.status) + .send(textBody); + return; + } if (ctx.log.level === 'silly') { ctx.log.trace(`[${id}] <<<--------------------------`);