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 websocket protocol for demo site #719

Merged
merged 4 commits into from
Jan 26, 2022
Merged

Fix websocket protocol for demo site #719

merged 4 commits into from
Jan 26, 2022

Conversation

limdauto
Copy link
Collaborator

Description

The demo site is served through HTTPS so we need wss for websocket.

Development notes

Lightsail does have a healthcheck for the index. The trouble is if websocket fails the server still returns an HTTP 200. We might need to look at a fix in apollo client to make it fail more gracefully and doesn't blow up the entire app.

QA notes

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

@@ -13,6 +13,8 @@ const wsHost =
? 'localhost:4142'
: window.location.host;

const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
Copy link
Member

Choose a reason for hiding this comment

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

Need to use this on line 19.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops the file wasn't saved and commited. Nice catch.

Copy link
Member

@tynandebold tynandebold left a comment

Choose a reason for hiding this comment

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

Nice.

@limdauto
Copy link
Collaborator Author

limdauto commented Jan 26, 2022

Proof that this is working nicely: https + wss in the screenshot
Screenshot from 2022-01-26 14-54-13

Signed-off-by: Lim Hoang <[email protected]>
@limdauto limdauto requested a review from yetudada as a code owner January 26, 2022 15:00
RELEASE.md Outdated
Comment on lines 3 to 9
<!--
Use the sections below to add notes for the next release.
Please follow the established format:
- Keep each note concise - ideally commit title length
- Use present tense (e.g. 'Add new feature')
- Include the ID number for the related PR (or PRs) in parentheses
-->
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep this in though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@limdauto limdauto merged commit 9085aef into main Jan 26, 2022
@limdauto limdauto deleted the fix/wss-prod branch January 26, 2022 15:24
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.

3 participants