2
This commit is contained in:
parent
b7f4e44295
commit
15e6aa0605
@ -17,7 +17,7 @@ func Cors() gin.HandlerFunc {
|
|||||||
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
|
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
|
||||||
c.Header("Access-Control-Allow-Headers", "appid,sign,Origin, X-Requested-With, Content-Type, Accept")
|
c.Header("Access-Control-Allow-Headers", "appid,sign,Origin, X-Requested-With, Content-Type, Accept")
|
||||||
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type")
|
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type")
|
||||||
c.Header("Access-Control-Allow-Credentials", "false")
|
c.Header("Access-Control-Allow-Credentials", "true")
|
||||||
c.Set("content-type", "application/json")
|
c.Set("content-type", "application/json")
|
||||||
}
|
}
|
||||||
if method == "OPTIONS" {
|
if method == "OPTIONS" {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user