Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 014a2fa9a3 | |||
| 5ceaef6144 |
@@ -1,9 +1,4 @@
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
# llama-swap
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ func New(config *Config) *ProxyManager {
|
||||
pm.ginEngine.Use(func(c *gin.Context) {
|
||||
if c.Request.Method == "OPTIONS" {
|
||||
c.Header("Access-Control-Allow-Origin", "*")
|
||||
c.Header("Access-Control-Allow-Methods", "*")
|
||||
c.Header("Access-Control-Allow-Headers", "*")
|
||||
c.AbortWithStatus(http.StatusNoContent)
|
||||
c.Header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
||||
c.Header("Access-Control-Allow-Headers", "Content-Type, Authorization")
|
||||
c.AbortWithStatus(204)
|
||||
return
|
||||
}
|
||||
c.Next()
|
||||
|
||||
Reference in New Issue
Block a user