I have my server file something like below.
const unleash = require('unleash-server');
unleash
.start({
db: {
ssl: false,
host: 'localhost',
port: 5432,
database: 'unleash',
user: 'unleash_user',
password: 'password',
},
server: {
port: 8443,
},
})
.then((unleash) => {
console.log(
Unleash started on http://localhost:${unleash.app.get('port')},
);
});
I
have 2 question here...
I am getting secrets as
/vault/secrets/cert.pem and /vault/secrets/key.pem
...I want to configure these secrets for 8443 port which is HTTPS...Is there a way I can configure my secretsI need to run my application on 2 ports HTTP 4242 and HTTPS 8443 Is there a way I can configure unleash with this
I tried to put but seems it is not working
Unleash recommends setting up a proxy terminating HTTPS for you and speaking HTTP to Unleash, as does the Express docs (the web framework running Unleash). See http://expressjs.com/en/advanced/best-practice-security.html#use-tls
You can use a proxy server like Nginx and configure both the SSL termination and listening on multiple ports.
Here's an example of how your Nginx config file could look like:
If you insist on having Unleash do HTTPS termination for you, you'll need to set that up yourself using
This would look something like: