Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CSP whitelist policies for avarda-hosted resources #40

Merged
merged 2 commits into from
May 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions etc/csp_whitelist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
<policies>
<policy id="script-src">
<values>
<value id="avarda" type="host">*.core.windows.net</value>
<value id="avarda-checkout" type="host">*.checkout-cdn.avarda.com</value>
</values>
</policy>
<policy id="connect-src">
<values>
<value id="avarda-checkout" type="host">*.checkout-api.avarda.com</value>
</values>
</policy>
<policy id="font-src">
<values>
<value id="avarda-checkout" type="host">*.checkout-api.avarda.com</value>
</values>
</policy>
<policy id="font-src">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Duplicate policy for the font-src.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, it should be img-src.

<values>
<value id="avarda-checkout" type="host">*.checkout-api.avarda.com</value>
</values>
</policy>
</policies>
</csp_whitelist>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add empty row to the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added