Fix main (#5435)
- fix lint issue - fix Apply Cors exception handler (do not work when logged out)
This commit is contained in:
@ -82,7 +82,7 @@
|
||||
"STORYBOOK_SCOPE": "pages"
|
||||
}
|
||||
},
|
||||
"performance": {
|
||||
"performance": {
|
||||
"env": {
|
||||
"NODE_OPTIONS": "--max_old_space_size=5000",
|
||||
"STORYBOOK_SCOPE": "performance"
|
||||
@ -124,7 +124,6 @@
|
||||
"modules": { "env": { "STORYBOOK_SCOPE": "modules" } },
|
||||
"pages": { "env": { "STORYBOOK_SCOPE": "pages" } },
|
||||
"performance": { "env": { "STORYBOOK_SCOPE": "performance" } }
|
||||
|
||||
}
|
||||
},
|
||||
"storybook:test:nocoverage": {
|
||||
@ -133,7 +132,6 @@
|
||||
"modules": { "env": { "STORYBOOK_SCOPE": "modules" } },
|
||||
"pages": { "env": { "STORYBOOK_SCOPE": "pages" } },
|
||||
"performance": { "env": { "STORYBOOK_SCOPE": "performance" } }
|
||||
|
||||
}
|
||||
},
|
||||
"storybook:static:test": {
|
||||
|
||||
@ -11,6 +11,10 @@ export class ApplyCorsToExceptions implements ExceptionFilter {
|
||||
const ctx = host.switchToHttp();
|
||||
const response = ctx.getResponse<Response>();
|
||||
|
||||
if (!response.header) {
|
||||
return;
|
||||
}
|
||||
|
||||
response.header('Access-Control-Allow-Origin', '*');
|
||||
response.header(
|
||||
'Access-Control-Allow-Methods',
|
||||
|
||||
Reference in New Issue
Block a user