File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ API_URL=/editor
2
2
AWS_ACCESS_KEY = <your-aws-access-key>
3
3
AWS_REGION = <your-aws-region>
4
4
AWS_SECRET_KEY = <your-aws-secret-key>
5
+ CORS_ALLOW_LOCALHOST = true
5
6
EMAIL_SENDER = <transactional-email-sender>
6
7
EMAIL_VERIFY_SECRET_TOKEN = whatever_you_want_this_to_be_it_only_matters_for_production
7
8
EXAMPLE_USER_EMAIL = [email protected]
Original file line number Diff line number Diff line change @@ -48,9 +48,13 @@ if (process.env.BASIC_USERNAME && process.env.BASIC_PASSWORD) {
48
48
49
49
const allowedCorsOrigins = [
50
50
/ p 5 j s \. o r g $ / ,
51
- / l o c a l h o s t / // to allow client-only development
52
51
] ;
53
52
53
+ // to allow client-only development
54
+ if ( process . env . CORS_ALLOW_LOCALHOST === 'true' ) {
55
+ allowedCorsOrigins . push ( / l o c a l h o s t / ) ;
56
+ }
57
+
54
58
// Run Webpack dev server in development mode
55
59
if ( process . env . NODE_ENV === 'development' ) {
56
60
const compiler = webpack ( config ) ;
You can’t perform that action at this time.
0 commit comments