You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -162,7 +162,6 @@ public void init() {
162
162
log.warn("WARNING: Invalid configuration detected: same-site-cookie policy is set to None, but secure-cookies are not enabled. Secure cookies must be enabled when using None as same-site-cookie policy ");
163
163
}
164
164
165
-
166
165
if (environment.getProperty("proxy.store-mode", "").equalsIgnoreCase("Redis")) {
167
166
if (!environment.getProperty("spring.session.store-type", "").equalsIgnoreCase("redis")) {
168
167
// running in HA mode, but not using Redis sessions
@@ -178,6 +177,20 @@ public void init() {
178
177
}
179
178
}
180
179
180
+
if (environment.getProperty("spring.session.store-type", "").equalsIgnoreCase("redis")) {
181
+
if (!environment.getProperty("proxy.store-mode", "").equalsIgnoreCase("Redis")) {
182
+
// using Redis sessions, but not running in HA mode -> this does not make sense
183
+
// even with one replica, the HA mode should be used in order for the server to survive restarts (which is the reason Redis sessions are used)
184
+
log.warn("WARNING: Invalid configuration detected: user sessions are stored in Redis, but store-more is not set to Redis. Change store-mode so that app sessions are stored in Redis!");
185
+
}
186
+
if (environment.getProperty( PROPERTY_RECOVER_RUNNING_PROXIES, Boolean.class, false) ||
// using Redis sessions together with app recovery -> this does not make sense
189
+
// if already using Redis for sessions there is no reason to not store app sessions
190
+
log.warn("WARNING: Invalid configuration detected: user sessions are stored in Redis and App Recovery is enabled. Instead of using App Recovery, change store-mode so that app sessions are stored in Redis!");
0 commit comments