0x4a52466c696e74 1 year ago
parent
commit
91371b9561
1 changed files with 5 additions and 0 deletions
  1. 5 0
      rest_http/rest.go

+ 5 - 0
rest_http/rest.go

@@ -53,6 +53,11 @@ func (s *Rest) handle(w http.ResponseWriter, r *http.Request) {
 		w.Header().Set(k, v)
 	}
 
+	// запросы prelight
+	if r.Method == "OPTIONS" {
+		return
+	}
+
 	// Инициализация rest Request
 	rr := &RequestIn{
 		RequestIn: &rest.RequestIn{