How to enable Content Security Policy inline script-src?
Posted by: HolyMoly (---.sitbs.at)
Date: May 08, 2023 11:50AM

Hi,

I'm getting CSP errors for using Stripe payment module in Prestashop.

browser console:
"Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”)."

How can I enable them?
I added to <IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'self';"
but its not working.

Options: ReplyQuote
Re: How to enable Content Security Policy inline script-src?
Posted by: RiggsFolly (Moderator)
Date: May 08, 2023 02:13PM

Hi,

This is not a WAMPServer issue. But this is what WAMPServer is for, for you to start your carear as a web master and do a bit of research into Apache to see how to configure it to cope with these requirements.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to enable Content Security Policy inline script-src?
Posted by: HolyMoly (---.sitbs.at)
Date: May 09, 2023 10:00AM

Hi,

You were right. I found the solution. Some firefox addon was causing the problem. So if you run into some CSP problems try to deactivate your browser addons and check again.

Options: ReplyQuote
Re: How to enable Content Security Policy inline script-src?
Posted by: RiggsFolly (Moderator)
Date: May 09, 2023 03:19PM

Hi,

As you cannot control what I or any other person has configured in their browser, this does not seem like a very robust solution. smiling smiley

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.