File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ API_URL=/editor
22AWS_ACCESS_KEY = <your-aws-access-key>
33AWS_REGION = <your-aws-region>
44AWS_SECRET_KEY = <your-aws-secret-key>
5+ CORS_ALLOW_LOCALHOST = true
56EMAIL_SENDER = <transactional-email-sender>
67EMAIL_VERIFY_SECRET_TOKEN = whatever_you_want_this_to_be_it_only_matters_for_production
78EXAMPLE_USER_EMAIL = examples@p5js.org
Original file line number Diff line number Diff line change @@ -48,9 +48,13 @@ if (process.env.BASIC_USERNAME && process.env.BASIC_PASSWORD) {
4848
4949const allowedCorsOrigins = [
5050 / p 5 j s \. o r g $ / ,
51- / l o c a l h o s t / // to allow client-only development
5251] ;
5352
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+
5458// Run Webpack dev server in development mode
5559if ( process . env . NODE_ENV === 'development' ) {
5660 const compiler = webpack ( config ) ;
You can’t perform that action at this time.
0 commit comments