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

|

|
||||||

|
|
||||||

|
|
||||||

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