Open x1unix opened 4 years ago
It's a bad practice to have Access-Control-Allow-Origin: * header. Basically you allow everybody from any web-site in browser to call your APIs.
Access-Control-Allow-Origin: *
admin.go
var restAdminExecHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*")
Generally, everyone can call all APIs - the issue here is that another origin can access data (the response). As there is no endpoint with secret or sensitive data, i dont really care.
It's a bad practice to have
Access-Control-Allow-Origin: *
header. Basically you allow everybody from any web-site in browser to call your APIs.admin.go