Revert "Revert "Revert "Revert "Add rewrite rules for HTML5 url""""
This change also removes backward compat /status rewrite The new URL scheme actually uses /status for the status page, and it should be rewritten to the index.html below instead. Change-Id: I7ff5a8387ec6fb65bda55d3233b670180682d08d
This commit is contained in:
parent
002efe1bbd
commit
425f80b2e2
|
@ -18,6 +18,7 @@
|
|||
|
||||
DocumentRoot <%= @docroot %>
|
||||
<Directory <%= @docroot %>>
|
||||
DirectoryIndex index.html
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
|
@ -40,19 +41,20 @@
|
|||
<% end -%>
|
||||
|
||||
<% if scope.lookupvar('::zuul::web::tenant_name') != '' -%>
|
||||
RewriteRule ^/$ /status.html [L]
|
||||
# Backwards compat for old status urls. Should be removed in a few weeks.
|
||||
RewriteRule ^/status$ <%= scope.lookupvar('::zuul::web::web_url') %>/api/tenant/<%= scope.lookupvar('::zuul::web::tenant_name') %>/status [P]
|
||||
RewriteRule ^/api/connection/(.*)$ <%= scope.lookupvar('::zuul::web::web_url') %>/api/connection/$1 [P]
|
||||
RewriteRule ^/api/console-stream <%= scope.lookupvar('::zuul::web::websocket_url') %>/api/tenant/<%= scope.lookupvar('::zuul::web::tenant_name') %>/console-stream [P]
|
||||
RewriteRule ^/api/(.*)$ <%= scope.lookupvar('::zuul::web::web_url') %>/api/tenant/<%= scope.lookupvar('::zuul::web::tenant_name') %>/$1 [P]
|
||||
RewriteRule ^/api/connection/(.*)$ <%= scope.lookupvar('::zuul::web::web_url') %>/api/connection/$1 [P,L]
|
||||
RewriteRule ^/api/console-stream <%= scope.lookupvar('::zuul::web::websocket_url') %>/api/tenant/<%= scope.lookupvar('::zuul::web::tenant_name') %>/console-stream [P,L]
|
||||
RewriteRule ^/api/(.*)$ <%= scope.lookupvar('::zuul::web::web_url') %>/api/tenant/<%= scope.lookupvar('::zuul::web::tenant_name') %>/$1 [P,L]
|
||||
<% else -%>
|
||||
RewriteRule ^/$ /tenants.html [L]
|
||||
RewriteRule ^/t/(.*) /$1 [L]
|
||||
RewriteRule ^/api/tenant/(.*)/console-stream <%= scope.lookupvar('::zuul::web::websocket_url') %>/api/tenant/$1/console-stream [P]
|
||||
RewriteRule ^/api/(.*)$ <%= scope.lookupvar('::zuul::web::web_url') %>/api/$1 [P]
|
||||
RewriteRule ^/api/tenant/(.*)/console-stream <%= scope.lookupvar('::zuul::web::websocket_url') %>/api/tenant/$1/console-stream [P,L]
|
||||
RewriteRule ^/api/(.*)$ <%= scope.lookupvar('::zuul::web::web_url') %>/api/$1 [P,L]
|
||||
<% end -%>
|
||||
|
||||
# Rewrite HTML5 route to index.html
|
||||
RewriteCond <%= @docroot %>/%{REQUEST_URI} !-f
|
||||
RewriteCond <%= @docroot %>/%{REQUEST_URI} !-d
|
||||
RewriteRule ^.*$ /index.html [L]
|
||||
|
||||
AddOutputFilterByType DEFLATE application/json
|
||||
|
||||
<IfModule mod_cache.c>
|
||||
|
|
Loading…
Reference in New Issue