PHP & Content-Security-Policy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



php-general@xxxxxxxxxxxxx

Hello. Has anyone got a good tutorial on how to use the
Content-Security-Policy  and php example codes ?

I've got 1 code on - but its blocked my own javascript from working :(

i've played with it & now have javascript going - However my google
maps doesn't work.

The map displays - but if you right-click, it should activate another
PHP script & display information - THAt part isn't going & its not
opening up the other php script.

The tutorials ive found only have 1-line examples - but no
combinations of examples.

Do I use them in separate lines ? or in one line ?

Example of what i have (blocks my own javascript):
header("Content-Security-Policy: default-src 'none'");
header("Content-Security-Policy: script-src 'self'");




i'm wanting - To allow simple javascript on my site, and also Google
analytics etc..

has anyone got good php code examples of multiple options ?

so far Ive got this - which seems to work. but doesn't allow me to
open up my 2nd php script.

header("Content-Security-Policy: script-src 'self' 'unsafe-inline'
*.google.com *.googleapis.com");

Is this line correct ?

What i'll like

A) to open up Javascript / SCRIPT comamnds on my own page
B) allow Google maps
C) allow Google analytics.


http://able.kwister.com/map/

(if you select regoon, and service - it should show icons that you can
select. but its not opening up the 2nd div / php script).

-- 

Gordon.



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux