commit | 019eed553f0125ebd221f203a504368ad30fb866 | [log] [tgz] |
---|---|---|
author | Kevin Burke <kev@inburke.com> | Tue Jul 18 11:38:00 2017 -0700 |
committer | Kevin Burke <kev@inburke.com> | Fri Aug 18 22:42:45 2017 +0000 |
tree | ebcc7f82c13367c38b30c009e7f5c2e636ec77aa | |
parent | 15156cc620204ad93b310a034ea46ae536d17da7 [diff] |
gddo-server: redirect HTTP requests to HTTPS Per the documentation at https://cloud.google.com/appengine/docs/flexible/go/how-requests-are-handled, you can detect whether a request was sent to your App Engine Flex application with HTTP or HTTPS by checking the X-Forwarded-Proto header on the request. This should not interfere with local development since local development usually does not occur behind a proxy. I could add tests around either the mux or the apiMux, but those seem difficult to back out from `func main`. Fixes golang/gddo#493. Change-Id: I735d0f8ee650d14a51bf70a3c958429063a48a86 Reviewed-on: https://go-review.googlesource.com/49650 Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com> Reviewed-by: Tuo Shan <shantuo@google.com>