keaton
keaton

Reputation: 177

how to configure Google Engine app.yaml to always resolve to https

my current web app resolves/response to both http and the https. How do I configure my app.yaml in a way that it should always resolve the incoming requests to https even if the user try forcefully through http.

PS: Noob here ;)

Upvotes: 1

Views: 39

Answers (1)

Guillem Xercavins
Guillem Xercavins

Reputation: 7058

You can use the secure element as explained in the docs for the paths you want to force https.

Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are preserved for the redirect.

Example:

- url: .*
  script: main.app
  secure: always

Upvotes: 2

Related Questions