mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 16:16:46 +00:00
Add UTF8 charset in dispatch server HTML template.
This commit is contained in:
parent
55b91ad150
commit
f1aa930ef5
@ -252,14 +252,14 @@ public final class DispatchServer {
|
||||
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 -> {
|
||||
if(Grasscutter.getConfig().DebugMode == ServerDebugMode.MISSING) {
|
||||
Grasscutter.getLogger().info(translate("messages.dispatch.unhandled_request_error", ctx.method(), ctx.url()));
|
||||
}
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user