• 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

Create a new line whenever an array value reaches more than 10 characters

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

PHP - installing Xdebug on Mac with XAMPP (Unix File)

Natural ORDER in Laravel Eloquent ORM

IlluminateDatabaseQueryException could not find driver [duplicate]

How can I format this number correctly using PHP?

How to install php_imagick on wamp64

Laravel views are showing from cache on one server but works fine on other server

PHP sort array of objects by two properties

Entity provider not working in security.yml php symfony3.4 ({"code":401,"message":"bad credentials"}.)

Results page in other window

How to use React Router with Laravel?

Apply session id from request header

Having trouble with PDO queries (Notice: Undefined index)

How to set time with DateTime modify?

About Contact Privacy policy Terms and conditions