-
-
Notifications
You must be signed in to change notification settings - Fork 281
onprem: redirect to login page if in private mode #505
Conversation
// 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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github doesn't show it in the diff, but see that we have checked AUTH_ENABLED in the lines above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for the info.
We should still redirect to /external-data-connector/#
instead of just /#
..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be checking for "AUTH_ENABLED" setting for the redirect to "/#"..
@tarzzz I've updated the redirection as advised on Slack. Thanks! |
💃 .. |
Fixes https://github.com/plotly/streambed/issues/11229