lyra / plugin-magento

An open source plugin that links Magento based e-commerce websites to PayZen secure payment gateway developed by Lyra Network.
https://lyra.com/fr/guides/magento/
Open Software License 3.0
10 stars 12 forks source link

Update csp_whitelist.xml #41

Open norgeindian opened 2 months ago

norgeindian commented 2 months ago

This should fix the following issues in Magento 2 Checkout in version 2.4.7 or higher, where Magento_Csp module is active by default:

Refused to load the script 'https://api.lyra.com/static/js/krypton-client/V4.0/stable/kr-payment-form.min.js' because it violates the following Content Security Policy directive: "script-src ...
Refused to load the stylesheet 'https://api.lyra.com/static/js/krypton-client/V4.0/ext/classic-reset.css' because it violates the following Content Security Policy directive: "style-src
diasnath commented 2 months ago

Hello @norgeindian , Did you change the URL for Javascript client in your magento configuration ? In General Configuration > REST API KEYS section.

norgeindian commented 2 months ago

@diasnath , don't know if I changed that some time ago, but it is set to https://api.lyra.com/static/

norgeindian commented 1 week ago

@diasnath , can you reproduce this issue on your end?

Ryldd commented 1 week ago

Hello @norgeindian, the url should not be https://api.lyra.com/static/ but https://static.lyra.com/static/ Can you try with it ?

norgeindian commented 1 week ago

@Ryldd , I tried to change that, but as soon as I save the config at this point, I get the error message Invalid file name. That happens even when I do not change anything. Debugged that a bit and found out, that you define some default file names for logos. In my case, Magento looks for them in pub/media/lyra/images, although they are not present there and only in pub/static folder. Have you already heard of this issue? How can this be fixed?