generated from openshift/console-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(proxy): websocket proxying, CSRF handling #85
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aptmac
previously approved these changes
Jan 30, 2025
7 tasks
@aptmac ready for re-review along with cryostatio/cryostat-web#1547 |
include console and CSRF headers
c97de79
to
8cea1e1
Compare
aptmac
approved these changes
Jan 31, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Depends on cryostatio/cryostat-web#1544
Depends on cryostatio/cryostat-web#1547
Description of the change:
Combine with
#1544cryostatio/cryostat-web#1547. This should allow the plugin to make all HTTP API requests. Previously, the lack of CSRF handling meant only GET requests would get through to the backend. Now, all requests like PATCH or POST should also get through. This fixes up GraphQL in particular, so the Archives view can be used to test that.The plugin UI does strange de-selection of the Cryostat instance, so it can be annoying to navigate around. Separate bug to be tackled. Re-selecting the same Cryostat instance should re-draw the proper routed view anyway, so it takes a few steps to get through an action. Go to Recordings and start a new recording on some target (ex.
cryostat-operator make sample_app
). Once the recording appears in the active recordings table, select it and use the Stop or Delete buttons. If the UI updates accordingly then the WebSocket notifications must be coming through. Check your browser's devtools network tab and ensure that there are HTTP 101 connections going to console URLs with paths like/upstream/api/v4/notifications?ns=foo&name=mycryostat
, and none going to other hosts likelocalhost
, and that one such connection is successfully established whenever the Cryostat instance context selection is changed.