• Hi,

    I have tried and installed the HTTP Header plugin in my Bitnami WordPress 5.7 site but when I configure some security headers and test it on securityheaders.com it looks like the settings aren’t being picked up and no security headers are working.

    Is this a known issue ?

    So to be safe for now, I’m using an old plugin called “HTTP Security” but there is no new development in that one and I want to enable the new “Permissions-Policy” header which is not in that old plugin that has the former “Feature-Policy”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin error in WordPress version 5.7:

    Fatal error: Uncaught Error: Call to a member function switch_to_locale() on null in /home/lesnoticiesdense/public_html/wp-includes/l10n.php:1666 Stack trace: #0 /home/lesnoticiesdense/public_html/wp-admin/includes/misc.php(132): switch_to_locale('ca') #1 /home/lesnoticiesdense/public_html/wp-content/plugins/http-headers/http-headers.php(1272): insert_with_markers('/home/lesnotici...', 'HttpHeaders', Array) #2 /home/lesnoticiesdense/public_html/wp-content/plugins/http-headers/http-headers.php(755): update_headers_directives() #3 /home/lesnoticiesdense/public_html/wp-includes/class-wp-hook.php(294): http_headers_option('PWVP_license') #4 /home/lesnoticiesdense/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array) #5 /home/lesnoticiesdense/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #6 /home/lesnoticiesdense/public_html/wp-includes/option.php(486): do_action('updated_option', 'PWVP_license', Array, Array) #7 /home/lesnoticiesdense/public_html/wp-includes/option.php(1725): u in /home/lesnoticiesdense/public_html/wp-includes/l10n.php on line 1666

    HTTP headers improvements:

    The prefix ‘X-‘ of HTTP headers is outdated since July 2012. More information in the following link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

    Hi,

    I found this which is working for me.

    Mr Ivanov, do you think you could apply that fix in the plugin?

    3. Replace the following

      add_action("added_option", 'http_headers_option');
      add_action("updated_option", 'http_headers_option');
    

    with:

      add_action("added_option", function() {
         add_action('admin_init', 'http_headers_option');
         add_action("updated_option", 'http_headers_option');
      });
    
    • This reply was modified 3 years, 4 months ago by davask.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HTTP Header plugin compatible with WP 5.7 ?’ is closed to new replies.