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

flask-paranoid compatible with crawlers ? #13

Closed
Sebastianlecoz opened this issue Mar 16, 2023 · 2 comments
Closed

flask-paranoid compatible with crawlers ? #13

Sebastianlecoz opened this issue Mar 16, 2023 · 2 comments
Labels

Comments

@Sebastianlecoz
Copy link

Sebastianlecoz commented Mar 16, 2023

How can i make my flask app with flask-paranoid compatible with crawlers ?

I tried to launch google light house on my app and the crawler seems to be redirected with a code 302.

I know that the lines

from flask_paranoid import Paranoid

paranoid = Paranoid()

def register_extensions(app):
   paranoid.init_app(app)
   paranoid.redirect_view = '/'
   

are causing the issue.

I was wondering if either

  1. there is a way to have some routes exempt from flask paranoid

or

  1. I am not using the package correctly
@miguelgrinberg
Copy link
Owner

There is no support for adding exceptions, but maybe you can actually do this if you erase the session by calling paranoid.clear_session() in your route or after_request handler. That will prevent the session from being set and every request will look like it is the first from that client.

@Sebastianlecoz
Copy link
Author

Thank you.
I'll try that.

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

No branches or pull requests

2 participants