fix
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
fda5a8d5b4
commit
236dd66cd0
|
@ -104,11 +104,11 @@ func main() {
|
|||
|
||||
func cors(h http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ua := r.Header.Get("User-Agent")
|
||||
if !strings.HasPrefix(ua, "crabs") {
|
||||
w.WriteHeader(403)
|
||||
return
|
||||
}
|
||||
// ua := r.Header.Get("User-Agent")
|
||||
// if !strings.HasPrefix(ua, "crabs") {
|
||||
// w.WriteHeader(403)
|
||||
// return
|
||||
// }
|
||||
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PATCH, DELETE")
|
||||
|
|
Loading…
Reference in New Issue