mirror of
https://github.com/rancher/norman.git
synced 2025-09-13 22:01:34 +00:00
Add Frame-Options header
Problem: Frame-Options header is not being set, this is a potential secutiry issue Solution: Set the header "X-Frame-Options:deny"
This commit is contained in:
committed by
Craig Jellick
parent
362802224f
commit
9ba19df9be
@@ -42,6 +42,7 @@ type HTMLResponseWriter struct {
|
||||
func (h *HTMLResponseWriter) start(apiContext *types.APIContext, code int, obj interface{}) {
|
||||
AddCommonResponseHeader(apiContext)
|
||||
apiContext.Response.Header().Set("content-type", "text/html")
|
||||
apiContext.Response.Header().Set("X-Frame-Options", "deny")
|
||||
apiContext.Response.WriteHeader(code)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user