This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 281e56b79ddb9f26a607f4f1af18fc3dfddd937b
Author: Dave Brondsema <[email protected]>
AuthorDate: Tue May 19 17:28:11 2026 -0400

    [#8607] add X-Content-Type-Options header
---
 Allura/allura/lib/custom_middleware.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Allura/allura/lib/custom_middleware.py 
b/Allura/allura/lib/custom_middleware.py
index a2c672b9e..5767f4ea7 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -566,6 +566,9 @@ def __call__(self, environ, start_response):
             resp.headers.add('Cross-Origin-Embedder-Policy', 
self.config['cross_origin_embedder_policy'])
         if self.config.get('cross_origin_resource_policy'):
             resp.headers.add('Cross-Origin-Resource-Policy', 
self.config['cross_origin_resource_policy'])
+
+        resp.headers.add('X-Content-Type-Options', 'nosniff')
+
         return resp(environ, start_response)
 
 

Reply via email to