fix
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Владимир Фёдоров 2024-10-05 00:49:48 +07:00
parent fda5a8d5b4
commit 236dd66cd0
1 changed files with 6 additions and 6 deletions

View File

@ -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")