From 32eb98361afcfe3c743c39236bb032b8d9a936fd Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sun, 3 Mar 2024 00:29:48 -0500 Subject: [PATCH] [+] Redirect option --- config/application.properties | 2 ++ src/main/java/icu/samnyan/aqua/sega/allnet/AllNet.kt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/application.properties b/config/application.properties index 98762c4f..fbb49b04 100644 --- a/config/application.properties +++ b/config/application.properties @@ -23,6 +23,8 @@ allnet.server.check-keychip=false allnet.server.keychip-ses-clean-interval=86400000 ## Token that haven't been used for this amount of time will be removed from the database. Default is 2 days. allnet.server.keychip-ses-expire=172800000 +## Redirect url when someone open this game server in a browser. +allnet.server.redirect=https://aquadx.net ## Http Server Port ## Only change this if you have a reverse proxy running. diff --git a/src/main/java/icu/samnyan/aqua/sega/allnet/AllNet.kt b/src/main/java/icu/samnyan/aqua/sega/allnet/AllNet.kt index 171e0af9..b4e36361 100644 --- a/src/main/java/icu/samnyan/aqua/sega/allnet/AllNet.kt +++ b/src/main/java/icu/samnyan/aqua/sega/allnet/AllNet.kt @@ -25,6 +25,7 @@ class AllNetProps { var port: Int? = null val keychipSesExpire: Long = 172800000 // milliseconds var checkKeychip: Boolean = false + var redirect: String = "web" var placeName: String = "" var placeId: String = "123" @@ -67,7 +68,7 @@ class AllNet( ) { @API("/") fun root(response: HttpServletResponse) { - response.sendRedirect("web") + response.sendRedirect(props.redirect) } @API("/sys/test")