SUI-Components / sui

Monorepo for SUI (Simple User Interface) packages.
169 stars 33 forks source link

Feat/use local ssl certificate development mode #1762

Closed fredyzz closed 4 months ago

fredyzz commented 4 months ago

Add SSL option to SUI-SSR

Description

With this option, you will be able to run server with a local SSL certificate.

This feature is intended solely for local development. It's useful for conducting local tests that target production endpoints. The inclusion of a certificate can help to avoid CORS issues

This mode can be activaded only in developement environment, so NODE_ENV should be set as "development".

To activate it, should be added the following config to the project package.json:

  {
    "SSL": {
      "development": {
        "key": "./.ssl/key.pem", // replace this with the path to the certificate key file
        "crt": "./.ssl/crt.pem" // replace this with the path to the certificate crt file
      }
    }
  }