File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,17 @@ const fileUpload = require('express-fileupload')
17
17
// setup express app
18
18
const app = express ( )
19
19
20
- app . use ( cors ( ) )
20
+ app . use ( cors ( {
21
+ exposedHeaders : [
22
+ 'X-Prev-Page' ,
23
+ 'X-Next-Page' ,
24
+ 'X-Page' ,
25
+ 'X-Per-Page' ,
26
+ 'X-Total' ,
27
+ 'X-Total-Pages' ,
28
+ 'Link'
29
+ ]
30
+ } ) )
21
31
app . use ( fileUpload ( {
22
32
limits : { fileSize : config . FILE_UPLOAD_SIZE_LIMIT }
23
33
} ) )
Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ async function ensureProjectExist (projectId, userToken) {
519
519
await axios . get ( url , { headers : { Authorization : `Bearer ${ token } ` } } )
520
520
}
521
521
} catch ( err ) {
522
- if ( err . response . status === 404 ) {
522
+ if ( _ . get ( err . response . status ) === 404 ) {
523
523
throw new errors . BadRequestError ( `Project with id: ${ projectId } doesn't exist` )
524
524
} else {
525
525
// re-throw other error
You can’t perform that action at this time.
0 commit comments