0x4a52466c696e74 1 年之前
父节点
当前提交
91371b9561
共有 1 个文件被更改,包括 5 次插入0 次删除
  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{