mirror of
https://github.com/go-gitea/gitea
synced 2025-11-22 22:28:16 +00:00
Move cors.X_FRAME_OPTIONS to security.X_FRAME_OPTIONS and add false option
This commit is contained in:
@@ -34,7 +34,10 @@ func RenderPanicErrorPage(w http.ResponseWriter, req *http.Request, err any) {
|
||||
routing.UpdatePanicError(req.Context(), err)
|
||||
|
||||
httpcache.SetCacheControlInHeader(w.Header(), 0, "no-transform")
|
||||
w.Header().Set(`X-Frame-Options`, setting.CORSConfig.XFrameOptions)
|
||||
|
||||
if setting.XFrameOptions != "false" {
|
||||
w.Header().Set(`X-Frame-Options`, setting.XFrameOptions)
|
||||
}
|
||||
|
||||
tmplCtx := context.TemplateContext{}
|
||||
tmplCtx["Locale"] = middleware.Locale(w, req)
|
||||
|
||||
Reference in New Issue
Block a user