Gutenberg Insecure Requests and Editor errors
Posted: Fri May 03, 2024 9:15 am
At date of this post, to fix the fact that the Gutenberg return (console) errors about insecure requests and suddenly cause the stop of the editor interface loading, and do not work in several ways, the fix to apply would be like this:
open the file
/wp-admin/admin-header.php
and just after this starting code:
add the follow line:
replace the old file with the new updated.
I did not reversed the problem from where it come out (why the js resource was loaded as http and not https causing the Gutenberg malfunction) and that disappeared after (so i cannot imagine anymore from where it was coming out) when the editor loaded good, after the above applied fix. Seem that once the fix has been applied and you load the editor, and then you update the template, all return to work: maybe it was something wrongly cached that goes fixed automatically.
open the file
/wp-admin/admin-header.php
and just after this starting code:
Code: Select all
<?php
/**
* WordPress Administration Template Header
*
* @package WordPress
* @subpackage Administration
*/
Code: Select all
header('Content-Security-Policy: upgrade-insecure-requests');
I did not reversed the problem from where it come out (why the js resource was loaded as http and not https causing the Gutenberg malfunction) and that disappeared after (so i cannot imagine anymore from where it was coming out) when the editor loaded good, after the above applied fix. Seem that once the fix has been applied and you load the editor, and then you update the template, all return to work: maybe it was something wrongly cached that goes fixed automatically.