commit | da7da4462ca59a3ef64f17cd35d619fcf1d3c879 | [log] [tgz] |
---|---|---|
author | Dmitri Shuralyov <dmitshur@golang.org> | Fri Oct 30 16:13:14 2020 -0400 |
committer | Dmitri Shuralyov <dmitshur@golang.org> | Fri Nov 06 23:26:50 2020 +0000 |
tree | b58bcf2839614e2de11b72bd47fc17246cff8b79 | |
parent | 989b9fc7a2626e387b19079b084798a016de1018 [diff] |
blog: redirect HTTP traffic to HTTPS Set secure to always on all handlers so that HTTP traffic is redirected to an HTTPS URL with the same path. References: • https://cloud.google.com/appengine/docs/standard/go/application-security#https_requests • https://cloud.google.com/appengine/docs/standard/go/config/appref#handlers_secure For golang/go#42281. Change-Id: I2b86928d51d4e692d29ded1b244f3866c9b087e9 Reviewed-on: https://go-review.googlesource.com/c/blog/+/266737 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
diff --git a/app.yaml b/app.yaml index 9e17b15..45a26b9 100644 --- a/app.yaml +++ b/app.yaml
@@ -15,9 +15,10 @@ default_expiration: "7d" +handlers: + # Keep these static file handlers in sync with blog.go. # They're here for improved latency across global regions. -handlers: - url: /favicon.ico static_files: static/favicon.ico upload: static/favicon.ico @@ -31,3 +32,9 @@ http_headers: Content-Type: application/font-woff secure: always + +# This is here to redirect all HTTP traffic to an HTTPS URL +# with the same path. +- url: /.* + script: auto + secure: always