fix: enabled CORS on the api.rest module in order to allow usage from other ports

This commit is contained in:
evilsocket 2018-09-17 17:39:52 +02:00
parent 319b6059a5
commit e0906c0afb
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -35,6 +35,7 @@ func setSecurityHeaders(w http.ResponseWriter) {
w.Header().Add("X-Content-Type-Options", "nosniff")
w.Header().Add("X-XSS-Protection", "1; mode=block")
w.Header().Add("Referrer-Policy", "same-origin")
w.Header().Set("Access-Control-Allow-Origin", "*")
}
func toJSON(w http.ResponseWriter, o interface{}) {