Enable base URL detection by default with npm start, remove FXA_CLIENT_ID
This commit is contained in:
parent
4c45d6217d
commit
512c9803bd
2 changed files with 7 additions and 8 deletions
|
@ -30,7 +30,7 @@
|
||||||
"test:report": "nyc report --reporter=html",
|
"test:report": "nyc report --reporter=html",
|
||||||
"test-integration": "cross-env NODE_ENV=development wdio test/wdio.docker.conf.js",
|
"test-integration": "cross-env NODE_ENV=development wdio test/wdio.docker.conf.js",
|
||||||
"circleci-test-integration": "echo 'webdriverio tests need to be updated to node 12'",
|
"circleci-test-integration": "echo 'webdriverio tests need to be updated to node 12'",
|
||||||
"start": "npm run clean && cross-env NODE_ENV=development L10N_DEV=true FXA_CLIENT_ID=fced6b5e3f4c66b9 BASE_URL=http://localhost:8080 webpack-dev-server --mode=development",
|
"start": "npm run clean && cross-env NODE_ENV=development L10N_DEV=true BASE_URL=http://localhost:8080 DETECT_BASE_URL=true webpack-dev-server --mode=development",
|
||||||
"android": "cross-env ANDROID=1 npm start",
|
"android": "cross-env ANDROID=1 npm start",
|
||||||
"prod": "node server/bin/prod.js"
|
"prod": "node server/bin/prod.js"
|
||||||
},
|
},
|
||||||
|
|
|
@ -212,17 +212,16 @@ conf.validate({ allowed: 'strict' });
|
||||||
|
|
||||||
const props = conf.getProperties();
|
const props = conf.getProperties();
|
||||||
|
|
||||||
const deriveBaseUrl = (req) => {
|
const deriveBaseUrl = req => {
|
||||||
if (props.detect_base_url) {
|
if (!props.detect_base_url) {
|
||||||
const protocol = req.secure ? 'https://' : 'http://';
|
|
||||||
|
|
||||||
return `${protocol}${req.headers.host}`;
|
|
||||||
} else {
|
|
||||||
return props.base_url;
|
return props.base_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const protocol = req.secure ? 'https://' : 'http://';
|
||||||
|
return `${protocol}${req.headers.host}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...props,
|
...props,
|
||||||
deriveBaseUrl,
|
deriveBaseUrl
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue