Skip to content

Commit

Permalink
fix: https in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Feb 10, 2021
1 parent 97c02b8 commit 5bb25b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ async function startServer (host, port) {
server = require('https').createServer(
{
key,
cert
cert,
rejectUnauthorized: false
},
app
)
Expand Down
12 changes: 10 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down

0 comments on commit 5bb25b8

Please sign in to comment.