WorPress Editor Won’t Load Content Anymore

Got this weird WordPress behaviour recently. While most pages load successfully, editing something – like a post or a page – will draw a blank browser tab. Zero content whatsoever. It has the same result for both Firefox and Chrome. Not tried on other browsers.

ANSWER

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'unsafe-inline'

This was the error that I got when I went into the page, opened developer tools, then reloaded the page.

Caused by additional custom Header policy on the web server of the website. Looks something like this:

Header set Content-Security-Policy "default-src 'unsafe-inline' 

Add ‘unsafe-eval’ to go around it. Use of eval() is usually considered bad practice and not secure hence it’s getting blocked until it is allowed by adding it into the policy. Now the Header will look like this after modifying it. Don’t forget to restart the web server.

Header set Content-Security-Policy "default-src 'unsafe-inline' 

More detailed explanations can be had here: https://scotthelme.co.uk/content-security-policy-an-introduction/

How to have only one login for multiple websites on the same linux machine?

I’m having multiple websites (like mediawiki, gitea and kanboard) and im thinking about making the login the same on all services.

But how do I do that?

I looked at AD but I read that it’s Windows only?
I also heard about “FreeIPA” but I read that it’s used for linux client machines?
Google is sadly not really helping me with that, as the question is too broad to get good results.

All I want is to make the logins on all my websites the same, so that if I create a user (or change password) once it gets updated on every website/service.
I don’t necessarily need the client OS (example: windows login) to be involved, but if that is necessary then I will do that.

Any help or directions would be greatly appreciated.

BR
Chris

Go to Source
Author: Chris