• 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

With doctrine ODM, can I embed many subdocuments in a main document?

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

How to pass security cloudflare server with php curl

Add 2 Webcam in one page with WebcamJS

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

xdebug 3 not working in ubuntu 20.04 with docker

WooCommerce - unset "<product> removed notice…" on cart page

PHP and WebView - Cookie doesn't are the same

Connecting an HTML webpage to a SQL Server

PHP only Hit Counter?

Saving Data from form to database using AngularJS and php

PDOException SQLSTATE[HY000] [2002] No such file or directory

Laravel: Why is my variable not being set while it's in the construct function of the controller?

Calculating Median of an array in PHP

Statement that checks whether a URL contains a particular path?

About Contact Privacy policy Terms and conditions