Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit f10f512

Browse files
author
Froilan Irizarry
authored
Merge pull request #267 from GSA/fix-allowed-domains
Fix allowed domains
2 parents cbd0b8b + 2314f3f commit f10f512

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

config/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,13 @@ function getConfig(env='development') {
127127
: `0.0.0.0:${config.PORT}`;
128128
config.SWAGGER_DOCUMENT = getSwaggerConf(config.isProd, apiUrl);
129129

130-
config.ALLOWED_DOMAINS = config.isProd ? ['https://api.data.gov'] : ['*'];
130+
config.ALLOWED_DOMAINS = [
131+
`http://localhost:${config.PORT}`,
132+
`http://127.0.0.1:${config.PORT}`
133+
];
134+
135+
config.ALLOWED_DOMAINS.push(config.isProd ? 'https://api.data.gov' : '*');
136+
131137
return config;
132138
}
133139

manifest-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ applications:
1212
ES_HEAP_SIZE: 10g
1313
CF_STAGING_TIMEOUT: 15
1414
CF_STARTUP_TIMEOUT: 15
15-
NODE_ENV: production
15+
NODE_ENV: staging
1616
NEW_RELIC_APP_NAME: code-api-staging
1717
ELASTICSEARCH_SERVICE_NAME: code_gov_elasticsearch
1818
services:

0 commit comments

Comments
 (0)