Fix main (#5435)
- fix lint issue - fix Apply Cors exception handler (do not work when logged out)
This commit is contained in:
@ -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