diff --git a/config.properties b/config.properties index 99d580f..63e5a27 100644 --- a/config.properties +++ b/config.properties @@ -38,5 +38,5 @@ hibernate.dialect:org.hibernate.dialect.PostgreSQLDialect hibernate.connection.username:piped hibernate.connection.password:changeme # Frontend configuration -frontend.statusPageUrl:https://kavin.rocks -frontend.donationUrl:https://kavin.rocks \ No newline at end of file +#frontend.statusPageUrl:https://kavin.rocks +#frontend.donationUrl:https://kavin.rocks diff --git a/src/main/java/me/kavin/piped/ServerLauncher.java b/src/main/java/me/kavin/piped/ServerLauncher.java index d9a4b5c..29e2adf 100644 --- a/src/main/java/me/kavin/piped/ServerLauncher.java +++ b/src/main/java/me/kavin/piped/ServerLauncher.java @@ -54,7 +54,7 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher { } })).map(GET, "/config", AsyncServlet.ofBlocking(executor, request -> { try { - return getJsonResponse(ResponseHelper.configResponse(), "no-store"); + return getJsonResponse(ResponseHelper.configResponse(), "public, max-age=86400"); } catch (Exception e) { return getErrorResponse(e, request.getPath()); } diff --git a/src/main/java/me/kavin/piped/consts/Constants.java b/src/main/java/me/kavin/piped/consts/Constants.java index 58282ea..bdf93dd 100644 --- a/src/main/java/me/kavin/piped/consts/Constants.java +++ b/src/main/java/me/kavin/piped/consts/Constants.java @@ -2,7 +2,6 @@ package me.kavin.piped.consts; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; - import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import me.kavin.piped.utils.PageMixin; import okhttp3.OkHttpClient; @@ -105,8 +104,8 @@ public class Constants { String key = String.valueOf(_key), value = String.valueOf(_value); if (key.startsWith("hibernate")) hibernateProperties.put(key, value); - else if (key.startsWith("frontend")) - frontendProperties.put(key.replace("frontend.", ""), value); + else if (key.startsWith("frontend.")) + frontendProperties.put(StringUtils.substringAfter(key, "frontend."), value); }); // transform hibernate properties for legacy configurations