MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index
# Content-Security-Policy Every response of an application carries mmo.core's security headers (`\MMO\core\server\securityHeaders`, sent by `Application::sendResponse` unless the response set its own). A `Content-Security-Policy` is one of them only when the application asks for it: an application that says nothing sends none and prints its pages as before. ## Turning it on ```jsonc "MMO\\core\\Application": { "contentSecurityPolicy": { "reportOnly": true, // the default: Content-Security-Policy-Report-Only, the browser blocks nothing "directives": { // replace, or remove with null, those of \MMO\core\server\CSP_DIRECTIVES "img-src": ["'self'", "data:", "blob:", "https://tiles.example.org"], "frame-ancestors": null } // "report": false // no report-uri } } ``` - `\MMO\core\server\CSP_DIRECTIVES` is the default policy: `'self'` for everything, scripts and `