Golang: Force web to use https instead of http


In order to force our application url to use https instead of normal http protocol on Google App Engine we can just add following lines to app.yml:

secure: always
redirect_http_response_code: 301

so it will look like this:

- url: /.*
  script: _go_app
  secure: always
  redirect_http_response_code: 301
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s