Skip to content

Commit

Permalink
Merge pull request ManageIQ#255 from carbonin/use_rewrite_for_websockets
Browse files Browse the repository at this point in the history
Make websockets work again
  • Loading branch information
bdunne authored Dec 18, 2017
2 parents 941a134 + 1d680df commit c54aa15
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions templates/miq-template-ext-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,11 @@ objects:
ServerName https://%{REQUEST_HOST}
ProxyPreserveHost on
ProxyPass /ws/ ws://${NAME}/ws/
ProxyPassReverse /ws/ ws://${NAME}/ws/
RewriteCond %{REQUEST_URI} ^/ws [NC]
RewriteCond %{HTTP:UPGRADE} ^websocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://${NAME}%{REQUEST_URI} [P,QSA,L]
# For httpd, some ErrorDocuments must by served by the httpd pod
RewriteCond %{REQUEST_URI} !^/proxy_pages
Expand Down
7 changes: 5 additions & 2 deletions templates/miq-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@ objects:
ServerName https://%{REQUEST_HOST}
ProxyPreserveHost on
ProxyPass /ws/ ws://${NAME}/ws/
ProxyPassReverse /ws/ ws://${NAME}/ws/
RewriteCond %{REQUEST_URI} ^/ws [NC]
RewriteCond %{HTTP:UPGRADE} ^websocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://${NAME}%{REQUEST_URI} [P,QSA,L]
# For httpd, some ErrorDocuments must by served by the httpd pod
RewriteCond %{REQUEST_URI} !^/proxy_pages
Expand Down

0 comments on commit c54aa15

Please sign in to comment.