• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to override header set in Apache config with more specific header in a virtual host

phpapachehttp-headersapache2virtualhost


PHP Snippet 1:

Header set Content-Security-Policy "frame-ancestors 'none';"

PHP Snippet 2:

Header unset Content-Security-Policy
Header always append Content-Security-Policy "frame-ancestors 'self' https://*.mydomain.com;"

Related Snippets

How to test a php login connected to a mysql db through xampp?

"cannot list resources" error from WooCommerce REST API

Composer Warning: openssl extension is missing. How to enable in WAMP

correct PHP headers for pdf file download

disable two buttons after clicking another button

How to make a foreign key not using primary key

PHP array slice from position + attempt to return fixed number of items

How to use PHPCBF to fix one issue at a time?

Connecting an HTML webpage to a SQL Server

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

Laravel Delete and Update

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

How to reset Laravel AuthManager/guards in between API calls in tests?

Call authenticate manually in router middleware

PHPExcel_IOFactory::createWriter causes wrong behaviour

About Contact Privacy policy Terms and conditions