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

fix nginx config for UI 2.0 websocket #7825

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

chrisciszak
Copy link
Contributor

@chrisciszak chrisciszak commented Jun 30, 2023

GitHub keywords to close any associated issues

Motivation

The UI 2.0 is not working with the current blockscout nginx config - it fails on the websocket giving consistent errors

Changelog

Enhancements

Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements.

Bug Fixes

Done

Incompatible Changes

Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add.

Upgrading

If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required".

Checklist for your Pull Request (PR)

@chrisciszak chrisciszak marked this pull request as ready for review June 30, 2023 21:49
@vbaranov
Copy link
Member

vbaranov commented Jul 3, 2023

@chrisciszak it looks like this setup still will throw errors like:

WebSocket connection to 'wss://localhost/socket/v2/websocket?vsn=2.0.0' failed: 

until SSL is not enabled

@chrisciszak
Copy link
Contributor Author

Thanks for checking in.

Shouldn't you call ws:// endpoint instead of wss if you are not on secure connection?

This PR adds a missing nginx config which is not related to secure connection. There is a config that specifies if you want ws or wss.

I'm happy to add it if you still want it with the explanation above.

@chrisciszak it looks like this setup still will throw errors like:


WebSocket connection to 'wss://localhost/socket/v2/websocket?vsn=2.0.0' failed: 

until SSL is not enabled

@vbaranov
Copy link
Member

vbaranov commented Jul 4, 2023

Thanks for checking in.

Shouldn't you call ws:// endpoint instead of wss if you are not on secure connection?

This PR adds a missing nginx config which is not related to secure connection. There is a config that specifies if you want ws or wss.

I'm happy to add it if you still want it with the explanation above.

@chrisciszak it looks like this setup still will throw errors like:


WebSocket connection to 'wss://localhost/socket/v2/websocket?vsn=2.0.0' failed: 

until SSL is not enabled

Ok, in order to make websockets work, we should add NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL='ws' for the frontend. I will do in frame of #7841. Thank you for contribution.

@vbaranov vbaranov self-requested a review July 4, 2023 08:03
@vbaranov vbaranov merged commit be743ff into blockscout:master Jul 4, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants