mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 21:33:22 +08:00
Add UTF8 charset in dispatch server HTML template.
This commit is contained in:
parent
b1bd0a5a95
commit
99dbac8ad3
@ -252,14 +252,14 @@ public final class DispatchServer {
|
|||||||
else config.enableCorsForAllOrigins();
|
else config.enableCorsForAllOrigins();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
httpServer.get("/", (req, res) -> res.send(translate("messages.status.welcome")));
|
httpServer.get("/", (req, res) -> res.send("<!doctype html><html><head><meta charset=\"utf8\"></head><body>" + translate("messages.status.welcome") + "</body></html>"));
|
||||||
|
|
||||||
httpServer.raw().error(404, ctx -> {
|
httpServer.raw().error(404, ctx -> {
|
||||||
if(Grasscutter.getConfig().DebugMode == ServerDebugMode.MISSING) {
|
if(Grasscutter.getConfig().DebugMode == ServerDebugMode.MISSING) {
|
||||||
Grasscutter.getLogger().info(translate("messages.dispatch.unhandled_request_error", ctx.method(), ctx.url()));
|
Grasscutter.getLogger().info(translate("messages.dispatch.unhandled_request_error", ctx.method(), ctx.url()));
|
||||||
}
|
}
|
||||||
ctx.contentType("text/html");
|
ctx.contentType("text/html");
|
||||||
ctx.result("<!doctype html><html lang=\"en\"><body><img src=\"https://http.cat/404\" /></body></html>"); // I'm like 70% sure this won't break anything.
|
ctx.result("<!doctype html><html><head><meta charset=\"utf8\"></head><body><img src=\"https://http.cat/404\" /></body></html>"); // I'm like 70% sure this won't break anything.
|
||||||
});
|
});
|
||||||
|
|
||||||
// Authentication Handler
|
// Authentication Handler
|
||||||
|
Loading…
Reference in New Issue
Block a user