Enable base URL detection by default with npm start, remove FXA_CLIENT_ID

This commit is contained in:
timvisee 2021-05-07 13:06:59 +02:00
parent 4c45d6217d
commit 512c9803bd
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
2 changed files with 7 additions and 8 deletions

View file

@ -212,17 +212,16 @@ conf.validate({ allowed: 'strict' });
const props = conf.getProperties();
const deriveBaseUrl = (req) => {
if (props.detect_base_url) {
const protocol = req.secure ? 'https://' : 'http://';
return `${protocol}${req.headers.host}`;
} else {
const deriveBaseUrl = req => {
if (!props.detect_base_url) {
return props.base_url;
}
const protocol = req.secure ? 'https://' : 'http://';
return `${protocol}${req.headers.host}`;
};
module.exports = {
...props,
deriveBaseUrl,
deriveBaseUrl
};