Skip to content

Commit

Permalink
fix(mc-html-template): permission policy to be joined with comma (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeekens authored Apr 29, 2021
1 parent 75efb3e commit 4d4b1f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-dodos-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@commercetools-frontend/mc-html-template": patch
---

Fix multiple permissions policies to be joined with comma not semicolon.
5 changes: 3 additions & 2 deletions packages/mc-html-template/src/process-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const mergeCspDirectives = (...csps) =>
),
{}
);
const toHeaderString = (directives = {}) =>
const toHeaderString = (directives = {}, seperator = '; ') =>
Object.entries(directives)
.map(
([directive, value]) =>
Expand Down Expand Up @@ -126,7 +126,8 @@ const processHeaders = (applicationConfig) => {
}),
...(applicationConfig.headers.permissionsPolicies && {
'Permissions-Policy': toHeaderString(
applicationConfig.headers.permissionsPolicies
applicationConfig.headers.permissionsPolicies,
', '
),
}),
};
Expand Down

1 comment on commit 4d4b1f9

@vercel
Copy link

@vercel vercel bot commented on 4d4b1f9 Apr 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.