File tree Expand file tree Collapse file tree 3 files changed +1
-23
lines changed
Expand file tree Collapse file tree 3 files changed +1
-23
lines changed Original file line number Diff line number Diff line change 4040 "babel-eslint" : " ^10.1.0" ,
4141 "bootstrap" : " ^5.2.3" ,
4242 "broccoli-asset-rev" : " ^3.0.0" ,
43- "cors" : " ^2.8.5" ,
4443 "ember-async-data" : " ^0.7.0" ,
4544 "ember-auto-import" : " ^2.2.4" ,
4645 "ember-bootstrap" : " ^5.1.1" ,
Original file line number Diff line number Diff line change 1010// };
1111
1212module . exports = function ( app ) {
13- const cors = require ( 'cors' ) ;
1413 const globSync = require ( 'glob' ) . sync ;
1514 const mocks = globSync ( './mocks/**/*.js' , { cwd : __dirname } ) . map ( require ) ;
1615 const proxies = globSync ( './proxies/**/*.js' , { cwd : __dirname } ) . map (
1716 require
1817 ) ;
1918
20- // Hardcoded allowed origins for CORS
21- const allowedOrigins = new Set ( [
22- 'http://localhost:5000' ,
23- 'https://stagingstreep.csvalpha.nl' ,
24- 'https://streep.csvalpha.nl' ,
25- ] ) ;
26-
27- app . use (
28- cors ( {
29- origin : function ( origin , callback ) {
30- // Allow requests with no origin (like mobile apps or curl)
31- if ( ! origin ) return callback ( null , true ) ;
32- if ( allowedOrigins . has ( origin ) ) return callback ( null , true ) ;
33- return callback ( new Error ( 'Not allowed by CORS' ) ) ;
34- } ,
35- credentials : true ,
36- } )
37- ) ;
38-
3919 // Log proxy requests
4020 const morgan = require ( 'morgan' ) ;
4121 app . use ( morgan ( 'dev' ) ) ;
Original file line number Diff line number Diff line change @@ -5537,7 +5537,6 @@ __metadata:
55375537 babel-eslint: ^10.1.0
55385538 bootstrap: ^5.2.3
55395539 broccoli-asset-rev: ^3.0.0
5540- cors: ^2.8.5
55415540 ember-async-data: ^0.7.0
55425541 ember-auto-import: ^2.2.4
55435542 ember-bootstrap: ^5.1.1
@@ -9685,7 +9684,7 @@ __metadata:
96859684 languageName: node
96869685 linkType: hard
96879686
9688- "cors@npm:^2.8.5, cors@npm: ~2.8.5":
9687+ "cors@npm:~2.8.5":
96899688 version: 2.8.5
96909689 resolution: "cors@npm:2.8.5"
96919690 dependencies:
You can’t perform that action at this time.
0 commit comments