2

I've recently installed a clean wordpress installation on my Ubuntu 18.04 LTS Server using nginx. Now i'm running into an error, when I've uploaded my images, I cant see them on the page.

Thats what the network console is giving me in my browser:

Refused to load the image '' because it violates the following Content Security Policy directive: "img-src https: data: 'unsafe-inline' 'unsafe-eval' ".

I dont know how to fix this, so I would appreciate if anyone knows how to fix this :)

Kind Regards

Yeriwen
  • 21
  • 3
  • Do you have a CSP plug-in for your WordPress site, or are you setting the headers in your Nginx configuration? – Richard Smith Nov 02 '19 at 19:16
  • 1
    Is your WordPress site using HTTPS? Do you have a valid certificate? Are the `img` tags referencing https? It looks like not everything is consistently & properly using HTTPS across your WordPress/nginx setup – AMtwo Nov 02 '19 at 19:17
  • @RichardSmith No, I don't have a CSP plugin for my WordPress Site. This is my Nginx config file: user www-data; worker_processes 1; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/conf-enabled/*.conf; include /etc/nginx/sites-enabled/*.conf; server_names_hash_bucket_size 64; } (note) I've installed iRedmail before, and it apperantly changed the config files by it self. – Yeriwen Nov 02 '19 at 19:23
  • @AMtwo Yes it is using HTTPS signed by a letsencrypt certificate. – Yeriwen Nov 02 '19 at 19:24
  • Did you reset the browser before testing. If this is the same website I looked at earlier, it seems to be loading on `https` fine. – Richard Smith Nov 02 '19 at 19:30
  • Yup, I did. They're kinda working. I tried to import some demo data from a wordpress theme. Now my Media Library looks like this: https://i.imgur.com/YKPba2Z.png I can also post images in a post - even if theyre blank in the media library, but somehow they arent shown on the front page. https://clan.addictedtogames.de/?p=4718 – Yeriwen Nov 02 '19 at 20:53

0 Answers0