mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 22:00: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.username:piped
|
||||||
hibernate.connection.password:changeme
|
hibernate.connection.password:changeme
|
||||||
# Frontend configuration
|
# Frontend configuration
|
||||||
frontend.statusPageUrl:https://kavin.rocks
|
#frontend.statusPageUrl:https://kavin.rocks
|
||||||
frontend.donationUrl:https://kavin.rocks
|
#frontend.donationUrl:https://kavin.rocks
|
||||||
|
@ -54,7 +54,7 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher {
|
|||||||
}
|
}
|
||||||
})).map(GET, "/config", AsyncServlet.ofBlocking(executor, request -> {
|
})).map(GET, "/config", AsyncServlet.ofBlocking(executor, request -> {
|
||||||
try {
|
try {
|
||||||
return getJsonResponse(ResponseHelper.configResponse(), "no-store");
|
return getJsonResponse(ResponseHelper.configResponse(), "public, max-age=86400");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return getErrorResponse(e, request.getPath());
|
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.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||||
import me.kavin.piped.utils.PageMixin;
|
import me.kavin.piped.utils.PageMixin;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
@ -105,8 +104,8 @@ public class Constants {
|
|||||||
String key = String.valueOf(_key), value = String.valueOf(_value);
|
String key = String.valueOf(_key), value = String.valueOf(_value);
|
||||||
if (key.startsWith("hibernate"))
|
if (key.startsWith("hibernate"))
|
||||||
hibernateProperties.put(key, value);
|
hibernateProperties.put(key, value);
|
||||||
else if (key.startsWith("frontend"))
|
else if (key.startsWith("frontend."))
|
||||||
frontendProperties.put(key.replace("frontend.", ""), value);
|
frontendProperties.put(StringUtils.substringAfter(key, "frontend."), value);
|
||||||
});
|
});
|
||||||
|
|
||||||
// transform hibernate properties for legacy configurations
|
// transform hibernate properties for legacy configurations
|
||||||
|
Loading…
Reference in New Issue
Block a user