-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #37761 - use ProxyPass and upgrade=websocket where possible #1185
Conversation
evgeni
commented
Sep 18, 2024
•
edited
Loading
edited
5b6ff1d
to
066c31a
Compare
# EL8: 2.4.37 / EL9: 2.4.62 / Debian11: 2.4.62 / Ubuntu20.04: 2.4.41 / Ubuntu22.04: 2.4.52 | ||
$proxy_upgrade_websocket = !($facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8') and !($facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '20.04') | ||
if $proxy_upgrade_websocket { | ||
$vhost_rewrites = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be undef
instead?
066c31a
to
f23fe50
Compare
I tried testing this, but I think it's user error,. I just run into "Sorry" when I try to look at the web console. |
can you post a screenshot with the browser console open to the network tab (and after a reload, as otherwise the tab is empty) |
Eh, you have no cockpit on the target machine, or no ssh set up |
I said user error. Cockpit is definitely set up. Let me double check SSH. Also, this error output sucks. |
this should make cockpit work against the foreman box and yes, please complain to cockpit-ws, we do not own that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me, thanks @evgeni !
f23fe50
to
02766b6
Compare
RewriteRules need special handling of some characters (esp "?"), which differs based on Apache version. Instead of going down that way, we can switch to using ProxyPass as proxying is the only thing we really need here, at least for HTTP. For WebSockets, we need to allow protocol upgrades, which modern (2.4.47+) Apache can do itself via "ProxyPass … upgrade=websocket". For older Apache (esp on EL8 and Ubuntu 20.04), we keep the RewriteRules in place. To be removed when we drop support for those targets. Co-Authored-By: Adam Ruzicka <[email protected]>
02766b6
to
07e773f
Compare
updated commit message etc. |