tour: 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_requestshttps://cloud.google.com/appengine/docs/standard/go/config/appref#handlers_secure

For golang/go#42281.

Change-Id: Ic03e01d5858e1e5b8ae1b523ab34d970e1403ce0
Reviewed-on: https://go-review.googlesource.com/c/tour/+/266817
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
1 file changed
tree: f19b5ba03b7d969dea1cd3978daa25baa4953977
  1. content/
  2. gotour/
  3. pic/
  4. reader/
  5. solutions/
  6. static/
  7. template/
  8. tools/
  9. tree/
  10. wc/
  11. .gcloudignore
  12. app.yaml
  13. appengine.go
  14. AUTHORS
  15. codereview.cfg
  16. CONTRIBUTING.md
  17. CONTRIBUTORS
  18. fmt.go
  19. go.mod
  20. go.sum
  21. LICENSE
  22. local.go
  23. README.md
  24. TODO
  25. tour.go
  26. TRANSLATE
README.md

Go Tour

A Tour of Go is an introduction to the Go programming language. Visit https://tour.golang.org to start the tour.

Download/Install

To install the tour from source, first install Go and then run:

$ go get golang.org/x/tour

This will place a tour binary in your workspace's bin directory. The tour program can be run offline.

Contributing

Contributions should follow the same procedure as for the Go project: https://golang.org/doc/contribute.html

To run the tour server locally:

go run .

Your browser should now open. If not, please visit http://localhost:3999/.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The issue tracker for the tour's code is located at https://github.com/golang/go/issues. Prefix your issue with “x/tour:” in the subject line, so it is easy to find.

Issues with the tour's content itself should be reported in the issue tracker at https://github.com/golang/tour/issues.

Deploying

  1. To deploy tour.golang.org, run:

    GO111MODULE=on gcloud --project=golang-org app deploy --no-promote app.yaml
    

    This will create a new version, which can be viewed within the golang-org GCP project.

  2. Check that the deployed version looks OK (click the version link in GCP).

  3. If all is well, click “Migrate Traffic” to move 100% of the tour.golang.org traffic to the new version.

  4. You're done.

License

Unless otherwise noted, the go-tour source files are distributed under the BSD-style license found in the LICENSE file.