mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-11-06 23:20:11 +01:00
Allow for valid hibernate environment variables
*nix systems can't have periods in their environment variable names, so we instead look for `HIBERNATE` prefixes, then lowercase and translate underscores to periods. This will allow for better compatibility with *nix systems when configuring likely sensitive hibernate values.
This commit is contained in:
parent
96287745bd
commit
e36bbd0445
@ -166,8 +166,9 @@ public class Constants {
|
|||||||
S3_CLIENT = null;
|
S3_CLIENT = null;
|
||||||
}
|
}
|
||||||
System.getenv().forEach((key, value) -> {
|
System.getenv().forEach((key, value) -> {
|
||||||
if (key.startsWith("hibernate"))
|
if (key.startsWith("HIBERNATE"))
|
||||||
hibernateProperties.put(key, value);
|
String k = key.replace("_", ".").toLowerCase();
|
||||||
|
hibernateProperties.put(k, value);
|
||||||
});
|
});
|
||||||
MATRIX_SERVER = getProperty(prop, "MATRIX_SERVER", "https://matrix-client.matrix.org");
|
MATRIX_SERVER = getProperty(prop, "MATRIX_SERVER", "https://matrix-client.matrix.org");
|
||||||
MATRIX_TOKEN = getProperty(prop, "MATRIX_TOKEN");
|
MATRIX_TOKEN = getProperty(prop, "MATRIX_TOKEN");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user