2
0
ミラー元 https://git.coolaj86.com/coolaj86/telebit-relay.js.git 前回の同期 2025-07-06 17:26:32 +00:00

set Content-Type html,utf-8

このコミットが含まれているのは:
AJ ONeal 2018-11-04 20:11:12 +00:00
コミット d48707d265

ファイルの表示

@ -76,6 +76,7 @@ module.exports.create = function (state) {
return http.createServer(function (req, res) {
if (!opts.servername) {
res.statusCode = 422;
res.setHeader('Content-Type', 'text/plain; charset=utf-8');
res.end(
"3. An inexplicable temporal shift of the quantum realm... that makes me feel uncomfortable.\n\n"
+ "[ERROR] No SNI header was sent. I can only think of two possible explanations for this:\n"
@ -87,6 +88,7 @@ module.exports.create = function (state) {
// TODO use req.headers.host instead of servername (since domain fronting is disabled anyway)
res.statusCode = 502;
res.setHeader('Content-Type', 'text/html; charset=utf-8');
res.end(
"<h1>Oops!</h1>"
+ "<p>It looks like '" + encodeURIComponent(opts.servername) + "' isn't connected right now.</p>"