HTTPS with SSL Certificate in DART HTTP Server

后端 未结 1 1508
野的像风
野的像风 2021-01-02 09:30

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条回答
  • 2021-01-02 10:00

    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) {
    
    0 讨论(0)
提交回复
热议问题