mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00: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
f378f43e94
commit
3691349d8b
1 changed files with 3 additions and 2 deletions
|
@ -164,8 +164,9 @@ public class Constants {
|
|||
S3_CLIENT = null;
|
||||
}
|
||||
System.getenv().forEach((key, value) -> {
|
||||
if (key.startsWith("hibernate"))
|
||||
hibernateProperties.put(key, value);
|
||||
if (key.startsWith("HIBERNATE"))
|
||||
String k = key.replace("_", ".").toLowerCase();
|
||||
hibernateProperties.put(k, value);
|
||||
});
|
||||
MATRIX_SERVER = getProperty(prop, "MATRIX_SERVER", "https://matrix-client.matrix.org");
|
||||
MATRIX_TOKEN = getProperty(prop, "MATRIX_TOKEN");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue