Add hibernate properties from env variables.

This commit is contained in:
FireMaskterK 2021-11-23 01:50:06 +00:00
parent 749cf48f4b
commit d34e22790f
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -66,6 +66,10 @@ public class Constants {
FRONTEND_URL = getProperty(prop, "FRONTEND_URL", "https://pipedapi.kavin.rocks");
COMPROMISED_PASSWORD_CHECK = Boolean.parseBoolean(getProperty(prop, "COMPROMISED_PASSWORD_CHECK", "true"));
DISABLE_REGISTRATION = Boolean.parseBoolean(getProperty(prop, "DISABLE_REGISTRATION", "false"));
System.getenv().forEach((key, value) -> {
if (key.startsWith("hibernate"))
hibernateProperties.put(key, value);
});
prop.forEach((_key, _value) -> {
String key = String.valueOf(_key), value = String.valueOf(_value);
if (key.startsWith("hibernate"))