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

Default install results in redirect loop on all pages #43

Closed
butstevetho opened this issue Feb 27, 2015 · 3 comments
Closed

Default install results in redirect loop on all pages #43

butstevetho opened this issue Feb 27, 2015 · 3 comments

Comments

@butstevetho
Copy link

I am using Django 1.7, and the latest stable install of django-blog-zinnia. Once I installed django-stronghold to its default settings via instructions on your readme, I get a redirect loop on all pages and it looks something like this:

'hxxp://example.com/login/?next=/login/%3Fnext%3D/login/%253Fnext%253D/login/%25253Fnext%25253D/login/%2525253Fnext%2525253D/login/%252525253Fnext%252525253D/login/%25252525253Fnext%25252525253D/login/%2525252525253Fnext%2525252525253D/login/%252525252525253Fnext%2525252525252..................... '

I am honestly not sure if this is something to do with stronghold but I would really like to be able to use this middleware either way!

EDIT: Oh my god. I am sorry for even posting this but I think it's because I have my own custom login urls, so stronghold treats it like any other url on my site and hence the loop!

@mgrouchy
Copy link
Owner

haha, no worries! Any questions or problems just let me know!

@butstevetho
Copy link
Author

The answer was: I had a bad regex defined in my STRONGHOLD_PUBLIC_URLS.

For anyone else having this issue, the correct format was:

STRONGHOLD_PUBLIC_URLS = ( r'^/login.*?$', )

@mgrouchy
Copy link
Owner

mgrouchy commented Mar 2, 2015

Thanks for the follow up @reydempto.

Cheers!

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

No branches or pull requests

2 participants