-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Move cors.X_FRAME_OPTIONS
to security.X_FRAME_OPTIONS
and add false
option
#30256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
cors.X_FRAME_OPTIONS
to security.X_FRAME_OPTIONS
and add false
optioncors.X_FRAME_OPTIONS
to security.X_FRAME_OPTIONS
and add false
option
BTW, the reason I investigated this is to set a default CSP header. CSP does include a |
I guess it's alright to merge this as-is. If we introduce CSP later, we can change the default of this value to |
Maybe we should have a warning if we detect the old value and have some warning on the admin panel. |
Should be possible. Any pointers where this warning code is? |
You can use |
The value of
X-Frame-Options
was previously in thecors
section but it's in fact entirely unrelated to CORS but a separate security-related option which should be in thesecurity
section.Additionally I've added a special value
false
, that if set will not add the header at all, e.g. the "insecure" variant.I don't expect much breakage from this because the only other valid value is
DENY
and people who wanted to remove the header would have likely done so at load-balancer level because gitea previously did not allow to unset the header at all.The
cors.X_FRAME_OPTIONS
setting has been moved tosecurity.X_FRAME_OPTIONS
. If you had customized this setting, please move it to thesecurity
section.