Merge pull request #140 from BytewaveMLP/config-host-trailing-slash

Append trailing / to config.host if not present
This commit is contained in:
Eliot Partridge
2019-09-25 14:11:38 -05:00
committed by GitHub
+5
View File
@@ -58,6 +58,11 @@ export const args = argv as AppArgs;
export const { version, description }: AppPackage = require('../../../package.json'); export const { version, description }: AppPackage = require('../../../package.json');
export const config: AppConfig = require('../../../config.json'); export const config: AppConfig = require('../../../config.json');
// append / to host if the server op forgot it
if (!config.host.endsWith('/')) {
config.host += '/';
}
const INSECURE_RANDOM_VALUES = [ const INSECURE_RANDOM_VALUES = [
'gfhfdshtrdhgedryhe4t3y5uwjthr', 'gfhfdshtrdhgedryhe4t3y5uwjthr',
'sdlfgihsdor8ghor8dgdrgdegrdg', 'sdlfgihsdor8ghor8dgdrgdegrdg',