File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
photon-server/src/main/java/org/photonvision/server Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 3636 wpimathVersion = wpilibVersion
3737 openCVYear = " 2025"
3838 openCVversion = " 4.10.0-3"
39- javalinVersion = " 5.6.2 "
39+ javalinVersion = " 6.7.0 "
4040 libcameraDriverVersion = " v2025.0.4"
4141 rknnVersion = " dev-v2025.0.0-5-g666c0c6"
4242 rubikVersion = " dev-v2025.1.0-8-g067a316"
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ protected void onClose(WsCloseContext context) {
8787 var reason = context .reason () != null ? context .reason () : "Connection closed by client" ;
8888 logger .info ("Closing websocket connection from " + host + " for reason: " + reason );
8989 } else {
90- logger .info ("Closing websockets for user " + context .getSessionId ());
90+ logger .info ("Closing websockets for user " + context .sessionId ());
9191 }
9292 }
9393
Original file line number Diff line number Diff line change 1818package org .photonvision .server ;
1919
2020import io .javalin .Javalin ;
21- import io .javalin .plugin .bundled .CorsPluginConfig ;
21+ import io .javalin .plugin .bundled .CorsPlugin ;
2222import java .net .InetSocketAddress ;
2323import java .util .List ;
2424import java .util .StringJoiner ;
@@ -60,10 +60,14 @@ private static void start(int port) {
6060 javalinConfig -> {
6161 javalinConfig .showJavalinBanner = false ;
6262 javalinConfig .staticFiles .add ("web" );
63- javalinConfig .plugins .enableCors (
64- corsContainer -> {
65- corsContainer .add (CorsPluginConfig ::anyHost );
66- });
63+ javalinConfig .registerPlugin (
64+ new CorsPlugin (
65+ cors -> {
66+ cors .addRule (
67+ it -> {
68+ it .anyHost ();
69+ });
70+ }));
6771
6872 javalinConfig .requestLogger .http (
6973 (ctx , ms ) -> {
You can’t perform that action at this time.
0 commit comments