mirror of
https://github.com/stulzq/azure-openai-proxy.git
synced 2025-12-18 23:04:19 +01:00
fix: CORS
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user