not-kennethreitz/flask-sslify

command sequence matters

bebbi opened this issue · 0 comments

bebbi commented

Placing the SSLify(app, ..) command before another function definition decorated with "@app.before_request" makes my app produce 500 errors on http requests instead of redirecting, while working ok for https requests.
My other decorated func adds properties to the flask g object which in the error case aren't found later at request time, so I assume it isn't called.
Just placing the SSLify(..) after that decorated func resolves this issue, everything works. I assume this is a SSLify issue?