From e6258cdf98f089b45c15143ce88af5773682180e Mon Sep 17 00:00:00 2001
From: Paul Richardson
Date: Mon, 22 Apr 2024 13:10:44 +0100
Subject: [PATCH] chore: Removes legacy /console location from nginx
configuration
* The /console location was added as access to the console in Openshift
3. This is no longer applicable to OCP 4 and access is provided using
a json config property or query in the OAuth plugin.
---
docker/nginx-gateway.conf.template | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/docker/nginx-gateway.conf.template b/docker/nginx-gateway.conf.template
index 8f4d6277..ecbcb60d 100644
--- a/docker/nginx-gateway.conf.template
+++ b/docker/nginx-gateway.conf.template
@@ -248,29 +248,4 @@ server {
# Do not foward authorization header
proxy_set_header Authorization "";
}
-
- # Get the OpenShift console URL
- location = /console {
- proxy_pass https://kubernetes.default/;
- error_page 302 = @console_redirect;
- proxy_intercept_errors on;
- }
-
- location @console_redirect {
- add_header Location $upstream_http_location always;
-
- # Prevent click jacking attacks
- # Note: must be re-declared since other headers have been added
- add_header X-Frame-Options "SAMEORIGIN";
-
- # Ensure only https is used for this server
- # Note: must be re-declared since other headers have been added
- add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
-
- # Govern what content can be loaded by the server and from where
- # Click jacking prevention to be used in addition to X-Frame-Options
- add_header Content-Security-Policy "default-src 'self'; frame-ancestors 'self'; form-action 'self'; ";
-
- return 200;
- }
}