This repository was archived by the owner on Aug 29, 2025. It is now read-only.
onprem: redirect to login page if in private mode#505
Merged
Conversation
tarzzz
reviewed
Aug 2, 2018
| // If not logged in and on-promise private-mode, redirect to login page | ||
| const plotlyAuthToken = req.cookies['plotly-auth-token']; | ||
| const onprem = getSetting('IS_RUNNING_INSIDE_ON_PREM'); | ||
| if (path === '/' && !plotlyAuthToken && onprem) { |
Contributor
There was a problem hiding this comment.
This will also redirect to login when "private mode" is not enabled which we do not want.
We should be checking for "AUTH_ENABLED" setting for the redirects..
Contributor
Author
There was a problem hiding this comment.
Github doesn't show it in the diff, but see that we have checked AUTH_ENABLED in the lines above.
Contributor
There was a problem hiding this comment.
Ok, thanks for the info.
We should still redirect to /external-data-connector/login instead of just /login ..
tarzzz
suggested changes
Aug 2, 2018
Contributor
Author
|
@tarzzz I've updated the redirection as advised on Slack. Thanks! |
Contributor
💃 .. |
tarzzz
approved these changes
Aug 3, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/plotly/streambed/issues/11229