correct CSP for phpMyAdmin with OpenLiteSpeed

70 Views Asked by At

Not able to access phpMyAdmin after installation on AWS EC2 with Ubuntu with openLiteSpeed

I have been trying various configurations of CSP headers and get the below with this set:

set Content-Security-Policy default-src http:; style-src 'self' 'unsafe-inline'   https://fonts.googleapis.com; img-src 'self' http: data:; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' data: https://fonts.gstatic.com;
5 Refused to load the stylesheet '<URL>' because it violates the following Content Security    Policy directive: "style-src 'self' 'unsafe-inline' <URL>". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

    33Refused to load the script '<URL>' because it violates the following Content Security Policy    directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

    index.php:55 Uncaught ReferenceError: CommonParams is not defined
    at index.php:55:1
(anonymous) @ index.php:55
    index.php:253     GET http://3.94.92.17/phpmyadmin/themes/dot.gif 404 (Not Found)
    index.php:240     GET http://3.94.92.17/phpmyadmin/themes/pmahomme/img/logo_right.png 404 (Not Found)
    favicon.ico:1     GET http://3.94.92.17/phpmyadmin/favicon.ico 404 (Not Found)

I have tried updating the Content-Security-Policy as well as different config settings in openLiteSpeed and phpMyAdmin. The correct rules have been applied to allow traffic on the port on AWS. No SSL cert currently installed, so needs to be http.

0

There are 0 best solutions below