Compare commits

..

No commits in common. "master" and "1.14.514.141" have entirely different histories.

View File

@ -48,7 +48,7 @@ public class WebServer {
Map.entry("woff2", "application/font-woff2"),
Map.entry("ttf", "application/font-sfnt"),
Map.entry("eot", "application/vnd.ms-fontobject"),
Map.entry("ico", "image/x-icon")
Map.entry("ico", "image/x-icon") // 添加 favicon.ico
);
public WebServer(PlayerTimeTracker timeTracker, int port, MinecraftServer minecraftServer) throws IOException {
@ -67,7 +67,7 @@ public class WebServer {
server.createContext("/api/stats", exchange -> {
handleCors(exchange);
if ("OPTIONS".equals(exchange.getRequestMethod())) {
exchange.sendResponseHeaders(204, -1);
exchange.sendResponseHeaders(204, -1); // CORS 预检请求
return;
}