mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-14 06:10:29 +05:30
Some small changes.
This commit is contained in:
parent
52370036e3
commit
51185f2558
@ -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
|
||||
#frontend.statusPageUrl:https://kavin.rocks
|
||||
#frontend.donationUrl:https://kavin.rocks
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user