mirror of
https://github.com/bettercap/bettercap
synced 2025-07-08 05:51:37 -07:00
fix: enabled CORS on the api.rest module in order to allow usage from other ports
This commit is contained in:
parent
319b6059a5
commit
e0906c0afb
1 changed files with 1 additions and 0 deletions
|
@ -35,6 +35,7 @@ func setSecurityHeaders(w http.ResponseWriter) {
|
||||||
w.Header().Add("X-Content-Type-Options", "nosniff")
|
w.Header().Add("X-Content-Type-Options", "nosniff")
|
||||||
w.Header().Add("X-XSS-Protection", "1; mode=block")
|
w.Header().Add("X-XSS-Protection", "1; mode=block")
|
||||||
w.Header().Add("Referrer-Policy", "same-origin")
|
w.Header().Add("Referrer-Policy", "same-origin")
|
||||||
|
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
}
|
}
|
||||||
|
|
||||||
func toJSON(w http.ResponseWriter, o interface{}) {
|
func toJSON(w http.ResponseWriter, o interface{}) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue