How do you serve ember-cli from https://localhost:4200 in development

后端 未结 3 574
梦如初夏
梦如初夏 2021-02-05 11:33

For our authentication to work with our ember app we need to serve the app from a secure url. We have a self signed ssl cert.

How do I setup the ember-cli to serve the

3条回答
  •  别跟我提以往
    2021-02-05 12:26

    Also see https://stackoverflow.com/a/30574934/1392763.

    If you will always use SSL you can set "ssl": true in the .ember-cli file for your project which will result in the ember serve command using SSL by default without having to pass the command line flag every time.

    By default ember-cli will look in an ssl folder in the root of your project for server.key and server.crt files but you can customize that as well with the --ssl-key and --ssl-cert options to provide an alternate path.

    If you don't already have a self signed SSL certificate for development you can follow these instructions to easily generate one: https://devcenter.heroku.com/articles/ssl-certificate-self

    Example .ember-cli:

    {
      "disableAnalytics": false,
      // Use SSL for development server by default
      "ssl": true,
      "ssl-key": "path/to/server.key",
      "ssl-cert": "path/to/server.crt"
    }
    

提交回复
热议问题