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

feature: redirect to webapp by displayName #1822

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tkurki
Copy link
Member

@tkurki tkurki commented Oct 27, 2024

Signal K webapps have displayName property. This PR adds automatic redirect to that webapp when the server's root is accessed with a hostname whose first element is the webapp's displayName.

So if you have a webapp whose displayName is foo and you access the server using url like http://foo.bar.org:3000/ you will be redirected to that webapp instead of the default landingPage that is the Admin webapp.

@tkurki
Copy link
Member Author

tkurki commented Oct 27, 2024

Here's an idea to create shortcuts to webapps via specially crafted hostnames. Could downstream systems like OpenPlotter create freeboard-sk.local type aliases to facilitate this? Thoughts @panaaj @sbender9 @godind

@tkurki tkurki added the feature label Oct 27, 2024
Signal K webapps have displayName property. This PR adds automatic redirect
to that webapp when the server's root is accessed with a hostname whose
first element is the webapp's displayName.

So if you have a webapp whose displayName is foo and you access the server
using url like http://foo.bar.org:3000/ you will be redirected to that
webapp instead of the default landingPage that is the Admin webapp.
@tkurki tkurki force-pushed the redirect-by-webapp-displayname branch from bcf0507 to 6fdab7b Compare October 27, 2024 20:01
@cmotelet
Copy link
Member

By changing the hostname, the webapp will lose what it has stored in the browser's local storage ?

@tkurki
Copy link
Member Author

tkurki commented Oct 27, 2024

Authentication will not work either across hosts without additional tweaking.

@tkurki tkurki changed the title feature: redirect to webapp by disiplayName feature: redirect to webapp by displayName Oct 28, 2024
@tkurki
Copy link
Member Author

tkurki commented Oct 28, 2024

...but I don't see localstorage as a problem, if you use one address consistently.

@panaaj
Copy link
Member

panaaj commented Oct 28, 2024

Changing the display name, although not likely to occur often will also cause the issue.

It's just comes down to managing the change over when it occurs, that will be the trigger for preferences in local storage to be lost.
Of course if they are stored on the server as well then the impact is lessened.

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

Successfully merging this pull request may close these issues.

3 participants