According to Google docs I added the following to app.yaml file:
handlers:
- url: /.*
script: auto
secure: always
redirect_http_response_code: 301
After app's deployment when I enter http://example.com no redirection to https://example.com occurs. My custom domain is verified by Google and SSL is set to Google's auto-managed feature. What am I missing?
Handlers in app.yaml were deprecated in the Google App Engine Flexible environment.
You need to force HTTPS connection according to the guide to make the browser use
httpsinstead ofhttpby using the HTTP Strict Transport Security response header.Example:
Strict-Transport-Security: max-age=31536000; includeSubDomainsAnother option is to use the custom HTTP header
X-Forwarded-Prototo redirect the HTTP traffic to HTTPS.Below is a similar issue.