From 5bb25b897c54d7f430d8c6dce2dfe870b7d45a03 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Wed, 10 Feb 2021 14:36:20 +0100 Subject: [PATCH] fix: https in development mode --- app.js | 3 ++- config/index.js | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 2ac6f61177d..85839b3953c 100644 --- a/app.js +++ b/app.js @@ -60,7 +60,8 @@ async function startServer (host, port) { server = require('https').createServer( { key, - cert + cert, + rejectUnauthorized: false }, app ) diff --git a/config/index.js b/config/index.js index 35684e29211..417f215f9a2 100644 --- a/config/index.js +++ b/config/index.js @@ -29,11 +29,19 @@ module.exports = { '/socket.io': { target: proxyURL, ws: true, + secure: false, // allow self signed certificates + changeOrigin: true + }, + '/health': { + target: proxyURL, secure: false, changeOrigin: true }, - '/health': proxyURL, - '/api': proxyURL + '/api': { + target: proxyURL, + secure: false, + changeOrigin: true + } }, https: !!process.env.SERVER_SSL,