[英]Use SSL with Dart and Managed VM's
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. 我想知道如何在localhost和部署时使用Dart和Managed VM的安全连接(https)。
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. 当一个应用程序使用部署 gcloud preview app deploy
的默认状态是App Engine应用程序将在HTTP和HTTPS提供服务。 If you have an application on 如果您有申请
http://project.appspot.com http://project.appspot.com
you can access it using HTTPS on 您可以使用HTTPS访问它
https://project.appspot.com https://project.appspot.com
If not accessing the default version the URL are: 如果没有访问默认版本,则URL为:
http://version.project.appspot.com http://version.project.appspot.com
and HTTPS on 和HTTPS上
https://version-dot-project.appspot.com https://version-dot-project.appspot.com
Note the first . 请注意第一个。 changing to -dot-. 改为-dot-。
You can specify the following int the app.yaml to only serve the application over HTTPS: 您可以在app.yaml中指定以下内容, 仅通过HTTPS为应用程序提供服务:
- url: /.*
script: dummy
secure: always
This will also redirect from HTTP to HTTPS, but unfortunately not do the rewrite from . 这也将从HTTP重定向到HTTPS,但遗憾的是没有重写。 to -dot- if not using the default version. -dot-如果不使用默认版本。
For local development using gcloud preview app run
it is not possible to use HTTPS. 对于使用本地开发gcloud preview app run
, 不可能使用HTTPS。 The following quote is from the App Engine documentation: 以下引用来自App Engine文档:
The development web server does not support HTTPS connections. 开发Web服务器不支持HTTPS连接。 It ignores the secure parameter, so paths intended for use with HTTPS can be tested using regular HTTP connections to the development web server. 它忽略了安全参数,因此可以使用与开发Web服务器的常规HTTP连接来测试旨在与HTTPS一起使用的路径。
See https://github.com/dart-lang/appengine/issues/16 and https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs . 请参阅https://github.com/dart-lang/appengine/issues/16和https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.