Skip to content

Commit

Permalink
chore: Removes legacy /console location from nginx configuration
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
phantomjinx committed Apr 22, 2024
1 parent 1e645cd commit e6258cd
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions docker/nginx-gateway.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit e6258cd

Please sign in to comment.