Compare commits
1 Commits
1.14.514.1
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e5eca44059 |
@ -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") // 添加 favicon.ico
|
||||
Map.entry("ico", "image/x-icon")
|
||||
);
|
||||
|
||||
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); // CORS 预检请求
|
||||
exchange.sendResponseHeaders(204, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user