Skip to content

Commit

Permalink
fix: cors
Browse files Browse the repository at this point in the history
  • Loading branch information
izatop committed Feb 14, 2022
1 parent ccf4d71 commit dc66bce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/web/src/Transport/Validation/CorsValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export class CorsValidation extends RequestValidatorAbstract<ICorsOptions> {
["access-control-allow-origin", this.getAccessControlOrigin(request)],
];

if (this.options.credentials) {
setHeaders.push(["access-control-allow-credentials", "true"]);
}

const vary = this.getVary();
if (vary) {
setHeaders.push(["Vary", vary]);
Expand Down

0 comments on commit dc66bce

Please sign in to comment.