Skip to content

Commit 680af28

Browse files
committed
Allow very permissive CORS headers (#77)
1 parent d94db42 commit 680af28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proxy/proxymanager.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ func New(config *Config) *ProxyManager {
7777
pm.ginEngine.Use(func(c *gin.Context) {
7878
if c.Request.Method == "OPTIONS" {
7979
c.Header("Access-Control-Allow-Origin", "*")
80-
c.Header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
81-
c.Header("Access-Control-Allow-Headers", "Content-Type, Authorization")
82-
c.AbortWithStatus(204)
80+
c.Header("Access-Control-Allow-Methods", "*")
81+
c.Header("Access-Control-Allow-Headers", "*")
82+
c.AbortWithStatus(http.StatusNoContent)
8383
return
8484
}
8585
c.Next()

0 commit comments

Comments
 (0)