Skip to content

Commit

Permalink
account for /dex (dex_uri) when enabling maintenance mode (#3736)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored Aug 20, 2024
1 parent 3c7cdbd commit cbcee72
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ood-portal-generator/spec/fixtures/ood-portal.conf.dex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
RewriteCond /var/www/ood/public/maintenance/index.html -f
RewriteCond /etc/ood/maintenance.enable -f
RewriteCond %{REQUEST_URI} !/public/maintenance/.*$
RewriteCond %{REQUEST_URI} !/dex.*$
RewriteRule ^.*$ /public/maintenance/index.html [R=302,L]

TraceEnable off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
RewriteCond /var/www/ood/public/maintenance/index.html -f
RewriteCond /etc/ood/maintenance.enable -f
RewriteCond %{REQUEST_URI} !/public/maintenance/.*$
RewriteCond %{REQUEST_URI} !/dex.*$
RewriteRule ^.*$ /public/maintenance/index.html [R=302,L]

TraceEnable off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
RewriteCond /var/www/ood/public/maintenance/index.html -f
RewriteCond /etc/ood/maintenance.enable -f
RewriteCond %{REQUEST_URI} !/public/maintenance/.*$
RewriteCond %{REQUEST_URI} !/dex.*$
RewriteRule ^.*$ /public/maintenance/index.html [R=302,L]

TraceEnable off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
RewriteCond /var/www/ood/public/maintenance/index.html -f
RewriteCond /etc/ood/maintenance.enable -f
RewriteCond %{REQUEST_URI} !/public/maintenance/.*$
RewriteCond %{REQUEST_URI} !/dex.*$
RewriteRule ^.*$ /public/maintenance/index.html [R=302,L]

TraceEnable off
Expand Down
3 changes: 3 additions & 0 deletions ood-portal-generator/templates/ood-portal.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ Listen <%= addr_port %>
RewriteCond <%= @public_root %>/maintenance/index.html -f
RewriteCond /etc/ood/maintenance.enable -f
RewriteCond %{REQUEST_URI} !<%= @public_uri %>/maintenance/.*$
<%- if @dex_uri && @dex_enabled -%>
RewriteCond %{REQUEST_URI} !<%= @dex_uri %>.*$
<%- end -%>
<%- @maintenance_ip_allowlist.each do |ip| -%>
RewriteCond %{REMOTE_ADDR} !^<%= escape_ip(ip) %>
<%- end -%>
Expand Down

0 comments on commit cbcee72

Please sign in to comment.