I have a flask app that is deployed to azure app services. The app service has SSL certificate that is managed by azure app services. It has also enabled to use only https from TSL/SSL settings in the app services.
I have a couple of absolute redirect url that goes from one page to another. I have set the _scheme=https for these type of absolute url like this
url_for("authorized", _external=True, _scheme = 'https').
I have also set app.config['PREFERRED_URL_SCHEME'] = 'https'
and this doesn't seem to work either.
How can I force my flask app absolute url to https in azure app services ? Any suggestions ?
p.s I was following this tutorials https://github.com/AzureAD/microsoft-authentication-library-for-python and it works for the localhost where it doesn't need https. But it fails to create absolute url in https while using in the appservices and because of this, the authentication to AzureAD is not successful.