Skip to content
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

Allow connecting to websockets via api/websocket/ #14866

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

chrismeyersfsu
Copy link
Member

SUMMARY

Before, we just allowed websockets on /websocket/. With this change, they can now come from /api/websocket/

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
AWX VERSION
awx: 23.7.1.dev2+gc2e498a5ea
ADDITIONAL INFORMATION

* Before, we just allowed websockets on <host>/websocket/. With this
  change, they can now come from <host>/api/websocket/
@@ -10,7 +10,7 @@ location {{ (ingress_path + '/favicon.ico').replace('//', '/') }} {
alias /awx_devel/awx/public/static/favicon.ico;
}

location {{ (ingress_path + '/websocket').replace('//', '/') }} {
location ~ ({{ (ingress_path + '/websocket').replace('//', '/') }}|{{ (ingress_path + '/api/websocket').replace('//', '/') }}) {
Copy link
Member

@relrod relrod Feb 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this simplify to

Suggested change
location ~ ({{ (ingress_path + '/websocket').replace('//', '/') }}|{{ (ingress_path + '/api/websocket').replace('//', '/') }}) {
location ~ {{ (ingress_path + '/(api/)?websocket').replace('//', '/') }} {

?

Copy link
Member

@relrod relrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One inline. Non-blocking, just a readability suggestion.

👍

Copy link
Member

@rooftopcellist rooftopcellist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nginx changes will also be needed in some form on in the awx-operator.

We should make sure this is clearly state in the release notes in case anyone was relying on this showing up at /websockets

@dmzoneill dmzoneill merged commit f429ef6 into ansible:devel Feb 13, 2024
22 checks passed
@chrismeyersfsu
Copy link
Member Author

The nginx changes will also be needed in some form on in the awx-operator.

Yep ansible/awx-operator#1709

We should make sure this is clearly state in the release notes in case anyone was relying on this showing up at /websockets

The endpoint here is additive. Didn’t want to break folks. I should make a card to deprecate /websockets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants