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

Error redirect not logged in anymore #340

Closed
leofranke95 opened this issue Jan 25, 2021 · 2 comments · Fixed by #351
Closed

Error redirect not logged in anymore #340

leofranke95 opened this issue Jan 25, 2021 · 2 comments · Fixed by #351
Assignees

Comments

@leofranke95
Copy link

leofranke95 commented Jan 25, 2021

Hey I have found a error if you are logged in to the page and the webserver restarts and you want to refresh the edit page, the redirect is not relative to base url.

It is found in the wildcard.route.js line 66

// Edit Page if ((config.authentication || config.authentication_for_edit) && !req.session.loggedIn) { res.redirect('/login'); return; }

It should be like this yes?

res.redirect(config.base_url + '/login');

This is important only where the app has a not default base_url. For example the app can be found for /mywiki.
In this case instead of /mywiki/login it will only redirect to /login where no route can be found.
Sorry if this is not an error and should be like this.

@ryanlelek
Copy link
Owner

Yep, sounds reasonable!
Let me do some further testing.

@ryanlelek ryanlelek self-assigned this Feb 5, 2021
ryanlelek added a commit that referenced this issue May 10, 2021
ryanlelek added a commit that referenced this issue May 10, 2021
@ryanlelek
Copy link
Owner

Ok, added this functionality.
Since it was 1-line and what you suggested, I merged it to master
#351

Thank you!
Let us know if this solves the issues you had

AnkushLambdatest pushed a commit to AnkushLambdatest/Raneto that referenced this issue Jun 29, 2022
AnkushLambdatest pushed a commit to AnkushLambdatest/Raneto that referenced this issue Jun 29, 2022
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 a pull request may close this issue.

2 participants