Set Content-Type nosniff for all downloads

This commit is contained in:
Sebastian Serth
2023-12-22 00:53:08 +01:00
committed by Sebastian Serth
parent 8fd5829110
commit 79faefde5a
4 changed files with 7 additions and 5 deletions

View File

@ -5,6 +5,7 @@ module CodeOcean
include CommonBehavior
include FileParameters
before_action :set_content_type_nosniff
# Overwrite the CSP header and some default actions for the :render_protected_upload action
content_security_policy false, only: :render_protected_upload
skip_before_action :deny_access_from_render_host, only: :render_protected_upload