fix: CORS

This commit is contained in:
Zhiqiang Li
2023-04-26 17:20:52 +08:00
parent c652c9a2b8
commit 3828aed90c

View File

@@ -20,8 +20,8 @@ import (
func Proxy(c *gin.Context) {
if c.Request.Method == http.MethodOptions {
c.Header("Access-Control-Allow-Origin", "*")
c.Header("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
c.Header("Access-Control-Allow-Headers", "Authorization")
c.Header("Access-Control-Allow-Methods", "GET, OPTIONS, POST")
c.Header("Access-Control-Allow-Headers", "Authorization, Content-Type")
c.Status(200)
return
}