mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
chore: Bump Javalin (#2126)
This commit is contained in:
@@ -87,7 +87,7 @@ public class DataSocketHandler {
|
||||
var reason = context.reason() != null ? context.reason() : "Connection closed by client";
|
||||
logger.info("Closing websocket connection from " + host + " for reason: " + reason);
|
||||
} else {
|
||||
logger.info("Closing websockets for user " + context.getSessionId());
|
||||
logger.info("Closing websockets for user " + context.sessionId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
package org.photonvision.server;
|
||||
|
||||
import io.javalin.Javalin;
|
||||
import io.javalin.plugin.bundled.CorsPluginConfig;
|
||||
import io.javalin.plugin.bundled.CorsPlugin;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.List;
|
||||
import java.util.StringJoiner;
|
||||
@@ -60,10 +60,14 @@ public class Server {
|
||||
javalinConfig -> {
|
||||
javalinConfig.showJavalinBanner = false;
|
||||
javalinConfig.staticFiles.add("web");
|
||||
javalinConfig.plugins.enableCors(
|
||||
corsContainer -> {
|
||||
corsContainer.add(CorsPluginConfig::anyHost);
|
||||
});
|
||||
javalinConfig.registerPlugin(
|
||||
new CorsPlugin(
|
||||
cors -> {
|
||||
cors.addRule(
|
||||
it -> {
|
||||
it.anyHost();
|
||||
});
|
||||
}));
|
||||
|
||||
javalinConfig.requestLogger.http(
|
||||
(ctx, ms) -> {
|
||||
|
||||
Reference in New Issue
Block a user