To facilitate this process, it would be immensely helpful if you could provide us with the code snippet that should be added to the .htaccess file.
Thread Starter
nyce22
(@nyce22)
Hello, I meant my security headers are being added to the html file causing duplicate headers: this is at the bottom of one of my cached pages:
<!– Cache served by breeze CACHE – Last modified: Thu, 04 Jan 2024 09:45:51 GMT –>
“;s:7:”headers”;a:10:{i:0;a:2:{s:4:”name”;s:14:”Content-Length”;s:5:”value”;i:146902;}i:1;a:2:{s:4:”name”;s:12:”Content-Type”;s:5:”value”;s:24:”text/html; charset=utf-8″;}i:2;a:2:{s:4:”name”;s:13:”Last-Modified”;s:5:”value”;s:29:”Thu, 04 Jan 2024 09:45:51 GMT”;}i:3;a:2:{s:4:”name”;s:23:”content-security-policy”;s:5:”value”;s:25:”upgrade-insecure-requests”;}i:4;a:2:{s:4:”name”;s:15:”x-frame-options”;s:5:”value”;s:10:”SAMEORIGIN”;}i:5;a:2:{s:4:”name”;s:15:”referrer-policy”;s:5:”value”;s:26:”no-referrer-when-downgrade”;}i:6;a:2:{s:4:”name”;s:25:”strict-transport-security”;s:5:”value”;s:16:”max-age=31536000″;}i:7;a:2:{s:4:”name”;s:22:”x-content-type-options”;s:5:”value”;s:7:”nosniff”;}i:8;a:2:{s:4:”name”;s:18:”permissions-policy”;s:5:”value”;s:17:”fullscreen=(self)”;}i:9;a:2:{s:4:”name”;s:16:”x-xss-protection”;s:5:”value”;s:13:”1; mode=block”;}}}
Please insert the following code into the child theme’s functions.php:
add_filter(‘breeze_custom_headers_allow’, function($custom_headers){ return array(); });
After adding the code, navigate to the Breeze plugin and save settings on the ‘Basic’ tab to reset the breeze-config.php file.
Thank you!
-
This reply was modified 2 years, 4 months ago by
adeelkhan.
Thread Starter
nyce22
(@nyce22)
Hello, it won’t let me save the file I get an error:
Your PHP code changes were not applied due to an error on line 48 of file wp-content/themes/mytheme/functions.php. Please fix and try saving again.Uncaught Error: Undefined constant “‘breeze_custom_headers_allow’” in wp-content/themes/mytheme/functions.php:48 Stack trace: #0 wp-settings.php(611): include() #1 wp-config.php(104): require_once(‘…’) #2 wp-load.php(50): require_once(‘…’) #3 wp-admin/admin.php(34): require_once(‘…’) #4 wp-admin/theme-editor.php(10): require_once(‘…’) #5 {main} thrown
Thread Starter
nyce22
(@nyce22)
never mind it was because of curly quotes’’ not being straight. It works thank you!