Skip to content

Commit 3d46ee1

Browse files
committed
Fix #25757: rename properties for consistency and clearity
1 parent bf4ddbb commit 3d46ee1

11 files changed

Lines changed: 23 additions & 23 deletions

src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,18 @@ public UndertowServletWebServerFactory servletContainer() {
118118
UndertowServletWebServerFactory factory = new UndertowServletWebServerFactory();
119119
factory.addDeploymentInfoCustomizers(info -> {
120120
info.setPreservePathOnForward(false); // required for the /api/route/{id}/ endpoint to work properly
121-
if (Boolean.valueOf(environment.getProperty("logging.requestdump", "false"))) {
122-
info.addOuterHandlerChainWrapper(defaultHandler -> Handlers.requestDump(defaultHandler));
121+
if (Boolean.parseBoolean(environment.getProperty("logging.requestdump", "false"))) {
122+
info.addOuterHandlerChainWrapper(Handlers::requestDump);
123123
}
124124
info.addInnerHandlerChainWrapper(defaultHandler -> mappingManager.createHttpHandler(defaultHandler));
125125

126126
String sameSiteCookie = environment.getProperty(PROP_PROXY_SAME_SITE_COOKIE, SAME_SITE_COOKIE_DEFAULT_VALUE);
127127
log.debug("Setting sameSiteCookie policy for session cookies to {}" , sameSiteCookie);
128-
info.addOuterHandlerChainWrapper(defaultHandler -> new SameSiteCookieHandler(defaultHandler, sameSiteCookie, null, true, true, true));
128+
info.addOuterHandlerChainWrapper(defaultHandler -> new SameSiteCookieHandler(defaultHandler, sameSiteCookie, null, true, true, true));
129129

130130
ServletSessionConfig sessionConfig = new ServletSessionConfig();
131131
sessionConfig.setHttpOnly(true);
132-
sessionConfig.setSecure(Boolean.valueOf(environment.getProperty("server.secureCookies", "false")));
132+
sessionConfig.setSecure(Boolean.parseBoolean(environment.getProperty("server.secure-cookies", "false")));
133133
info.setServletSessionConfig(sessionConfig);
134134
if (sessionManagerFactory != null) {
135135
info.setSessionManagerFactory(sessionManagerFactory);

src/main/java/eu/openanalytics/containerproxy/security/WebSecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void handle(HttpServletRequest request, HttpServletResponse response, Acc
122122
// Always set header: X-Content-Type-Options=nosniff
123123
http.headers().contentTypeOptions();
124124

125-
String frameOptions = environment.getProperty("server.frameOptions", "disable");
125+
String frameOptions = environment.getProperty("server.frame-options", "disable");
126126
switch (frameOptions.toUpperCase()) {
127127
case "DISABLE":
128128
http.headers().frameOptions().disable();

src/main/java/eu/openanalytics/containerproxy/service/AppRecoveryService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
@Service
5454
public class AppRecoveryService {
5555

56-
protected static final String PROPERTY_RECOVER_RUNNING_APPS = "proxy.recover_running_apps";
56+
protected static final String PROPERTY_RECOVER_RUNNING_PROXIES = "proxy.recover_running_proxies";
5757

5858
private final Logger log = LogManager.getLogger(AppRecoveryService.class);
5959

@@ -79,7 +79,7 @@ public class AppRecoveryService {
7979

8080
@EventListener(ApplicationReadyEvent.class)
8181
public void recoverRunningApps() throws Exception {
82-
if (Boolean.parseBoolean(environment.getProperty(PROPERTY_RECOVER_RUNNING_APPS, "false"))) {
82+
if (Boolean.parseBoolean(environment.getProperty(PROPERTY_RECOVER_RUNNING_PROXIES, "false"))) {
8383
log.info("Recovery of running apps enabled");
8484

8585
Map<String, Proxy> proxies = new HashMap();

src/main/java/eu/openanalytics/containerproxy/service/ProxyService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ public class ProxyService {
106106

107107
private boolean stopAppsOnShutdown;
108108

109-
private static final String PROPERTY_STOP_APPS_ON_SHUTDOWN = "proxy.stop_apps_on_shutdown";
109+
private static final String PROPERTY_STOP_PROXIES_ON_SHUTDOWN = "proxy.stop_proxies_on_shutdown";
110110

111111
@PostConstruct
112112
public void init() {
113-
stopAppsOnShutdown = Boolean.parseBoolean(environment.getProperty(PROPERTY_STOP_APPS_ON_SHUTDOWN, "true"));
113+
stopAppsOnShutdown = Boolean.parseBoolean(environment.getProperty(PROPERTY_STOP_PROXIES_ON_SHUTDOWN, "true"));
114114
}
115115

116116
@PreDestroy

src/test/resources/application-app-recovery_docker-swarm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
proxy:
2-
recover_running_apps: true
3-
stop_apps_on_shutdown: false
2+
recover_running_proxies: true
3+
stop_proxies_on_shutdown: false
44

55
authentication: simple
66
containerBackend: docker-swarm

src/test/resources/application-app-recovery_docker-swarm_2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
proxy:
22
titlle: Yet Another Instance
3-
recover_running_apps: true
4-
stop_apps_on_shutdown: false
3+
recover_running_proxies: true
4+
stop_proxies_on_shutdown: false
55

66
authentication: simple
77
containerBackend: docker-swarm

src/test/resources/application-app-recovery_docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
proxy:
2-
recover_running_apps: true
3-
stop_apps_on_shutdown: false
2+
recover_running_proxies: true
3+
stop_proxies_on_shutdown: false
44

55
authentication: simple
66
container-backend: docker

src/test/resources/application-app-recovery_docker_2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
proxy:
22
titlle: Yet Another Instance
3-
recover_running_apps: true
4-
stop_apps_on_shutdown: false
3+
recover_running_proxies: true
4+
stop_proxies_on_shutdown: false
55

66
authentication: simple
77
container-backend: docker

src/test/resources/application-app-recovery_kubernetes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
proxy:
2-
recover_running_apps: true
3-
stop_apps_on_shutdown: false
2+
recover_running_proxies: true
3+
stop_proxies_on_shutdown: false
44

55
authentication: simple
66
container-backend: kubernetes

src/test/resources/application-app-recovery_kubernetes_2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
proxy:
22
titlle: Yet Another Instance
3-
recover_running_apps: true
4-
stop_apps_on_shutdown: false
3+
recover_running_proxies: true
4+
stop_proxies_on_shutdown: false
55

66
authentication: simple
77
container-backend: kubernetes

0 commit comments

Comments
 (0)