The Content-Security-Policy[^1] http header was only set on the response generated by controllers but it was missing from the `/<module>/static/` route. It is not strictly necessary to set that header on the responses comming from that routes as it is not possible to add new static files or edit existing ones via the interface (not even as admin). Only the developers and system administrator can access those files. It is also worth mentionning that using the Odoo internal web server to deliver static files is suboptimal. Outside of a dev environment, those files will typically be delivered via a web server[^2] and sysadmins should configure their web server to set the CSP header on static images. [^1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP [^2]: https://www.odoo.com/documentation/master/administration/install/deploy.html#serving-static-files-and-attachments closes odoo/odoo#146591 X-original-commit: 55e09d504df9bd134afb6e0b38f03457b5c71e8e Related: odoo/documentation#6953 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
11 lines
265 B
Python
11 lines
265 B
Python
from . import test_common
|
|
from . import test_echo_reply
|
|
from . import test_error
|
|
from . import test_greeting
|
|
from . import test_misc
|
|
from . import test_models
|
|
from . import test_session
|
|
from . import test_static
|
|
from . import test_web_server
|
|
from . import test_xss
|