I wish to know how I can use a secure connection (https) with Dart and Managed VM's on localhost and when it's deployed.
Thank you.
I wish to know how I can use a secure connection (https) with Dart and Managed VM's on localhost and when it's deployed.
Thank you.
When an application is deployed using gcloud preview app deploy
the default is that the App Engine application will be served on both HTTP and HTTPS. If you have an application on
http://project.appspot.com
you can access it using HTTPS on
https://project.appspot.com
If not accessing the default version the URL are:
http://version.project.appspot.com
and HTTPS on
https://version-dot-project.appspot.com
Note the first . changing to -dot-.
You can specify the following int the app.yaml to only serve the application over HTTPS:
- url: /.*
script: dummy
secure: always
This will also redirect from HTTP to HTTPS, but unfortunately not do the rewrite from . to -dot- if not using the default version.
For local development using gcloud preview app run
it is not possible to use HTTPS. The following quote is from the App Engine documentation:
The development web server does not support HTTPS connections. It ignores the secure parameter, so paths intended for use with HTTPS can be tested using regular HTTP connections to the development web server.
See https://github.com/dart-lang/appengine/issues/16 and https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs.