Does the Dart HTTP Server support HTTPS? If so, how do you specify the certificate? If not, are there any alternatives such as community created packages?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes. Dart supports https.
See the documentation here and a test here.
Relevant lines:
HttpServer.bindSecure(HOST_NAME,
0,
backlog: 5,
certificateName: 'localhost_cert').then((server) {