Closed gene1wood closed 9 years ago
Another approach would be something with the PREFERRED_URL_SCHEME
flask config setting
app.config.update(dict(
PREFERRED_URL_SCHEME = 'https'
))
This is great! Is it safe for me to assume that you tested this as working?
I like your first approach better. It's more verbose, but seems (to me) to be more clear.
Yes, I've tested this and it resolves the issue for https
SPs. I also tried to get the PREFERRED_URL_SCHEME
approach to work but didn't have luck.
Cool, thanks for the PR! :bow:
The Okta example code shows ngrok images where both
http
andhttps
are being forwarded to theokta-pysaml2-example
flask app. Unfortunately, the example settings which us theurl_for
flask method only contain a list ofhttp
ACS endpoints. If a user using the example code sees the ngrok screenshots and wants to use anhttps
endpoint instead, they'll encounter the errorand the uncaught exception
Here's how I've updated the example code to work with
https
. If there's a more elegant way to get the ACS list to supporthttps
when needed, that would work too.