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

Feat / Deterministic public URLs #644

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

langemike
Copy link
Collaborator

When you build an OTT app for another platform than web, we cannot rely on the value of window.location.origin.

In a lot of hybrid web-apps, this variable will contain a URL to a local webserver. Eg. capacitor://localhost for Capacitor based platforms.

This caused two bugs:

  1. It caused a "not valid URL" error message in the "Reset password" form - OTT-2707
  2. It caused an infinite spinner when using "Send password reset mail" from your account settings. This happens because of the same (but uncaught) error. - OTT-2804

While we fixed this issue, we took it a step further to completely remove window.location.origin references throughout the project.

When APP_PUBLIC_URL is not defined within your (web) .env-file, we still fallback on the the same value, making this a non-breaking change.

Copy link
Collaborator

@ChristiaanScheermeijer ChristiaanScheermeijer left a comment

Choose a reason for hiding this comment

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

Nice! 🙌

@langemike langemike merged commit 99d4658 into jwplayer:develop Nov 18, 2024
9 checks passed
@langemike langemike deleted the feat/deterministic-public-url branch November 18, 2024 07:56
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