Compare commits

...

4 Commits

Author SHA1 Message Date
Benson Wong 680af28bcc Allow very permissive CORS headers (#77) 2025-03-20 15:50:21 -07:00
Benson Wong d94db42ffe fix bug checking incorrect error 2025-03-20 15:49:36 -07:00
Benson Wong 93cd83c55c add override for windows (#76) 2025-03-20 13:23:04 -07:00
Benson Wong 5565fca3ac add some badges to README 2025-03-19 11:25:06 -07:00
4 changed files with 22 additions and 5 deletions
+13 -1
View File
@@ -15,4 +15,16 @@ builds:
- goos: freebsd - goos: freebsd
goarch: arm64 goarch: arm64
- goos: windows - goos: windows
goarch: arm64 goarch: arm64
# use zip format for windows
archives:
- id: default
format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds_info:
group: root
owner: root
format_overrides:
- goos: windows
format: zip
+5
View File
@@ -1,4 +1,9 @@
![llama-swap header image](header.jpeg) ![llama-swap header image](header.jpeg)
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/mostlygeek/llama-swap/total)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mostlygeek/llama-swap/go-ci.yml)
![GitHub Repo stars](https://img.shields.io/github/stars/mostlygeek/llama-swap)
# llama-swap # llama-swap
+1 -1
View File
@@ -160,7 +160,7 @@ func (p *Process) start() error {
// Set process state to failed // Set process state to failed
if err != nil { if err != nil {
if curState, swapErr := p.swapState(StateStarting, StateFailed); err != nil { if curState, swapErr := p.swapState(StateStarting, StateFailed); swapErr != nil {
return fmt.Errorf( return fmt.Errorf(
"failed to start command and state swap failed. command error: %v, current state: %v, state swap error: %v", "failed to start command and state swap failed. command error: %v, current state: %v, state swap error: %v",
err, curState, swapErr, err, curState, swapErr,
+3 -3
View File
@@ -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", "GET, POST, OPTIONS") c.Header("Access-Control-Allow-Methods", "*")
c.Header("Access-Control-Allow-Headers", "Content-Type, Authorization") c.Header("Access-Control-Allow-Headers", "*")
c.AbortWithStatus(204) c.AbortWithStatus(http.StatusNoContent)
return return
} }
c.Next() c.Next()