diff --git a/INSTALL.md b/INSTALL.md index b98b3c32..e819d922 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,6 +37,13 @@ increase the system-wide limit: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p ``` +## Unsigned SSL Certificates for sensu-backend +In development, you might not have a signed CA certificate for the API URL for the sensu backend. Set this environment variable (`NODE_PROXY_SECURE`) to false to turn off SSL cert verification. + +```bash +NODE_PROXY_SECURE=false NODE_ENV=development PORT=5000 API_URL=https://my-sensu-backend-api:8080 yarn node scripts serve --modules-folder /opt/sensu/yarn/node_modules +``` + ## Running in Production In production, you probably don't want the source code files owned by the diff --git a/scripts/serve.js b/scripts/serve.js index 28f30136..462ab526 100644 --- a/scripts/serve.js +++ b/scripts/serve.js @@ -24,6 +24,7 @@ app.use(compression()); app.use( createProxyMiddleware(proxyPaths, { target: apiUrl, + secure: process.env.NODE_PROXY_SECURE === "false" ? false : true, logLevel: process.env.NODE_ENV === "development" ? "silent" : "info", }), );