Skip to content

Commit 106629b

Browse files
authored
all orgins
1 parent 2fce7d3 commit 106629b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

  • backend/internal/middleware/cors

backend/internal/middleware/cors/cors.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"net/http"
55
"os"
66
"strings"
7-
"fmt"
7+
//"fmt"
88

99
)
1010

@@ -13,10 +13,7 @@ func CORS(next http.Handler) http.Handler {
1313

1414
origin := r.Header.Get("Origin")
1515

16-
if origin == "http://localhost:5173" ||
17-
origin == "https://scintillating-commitment-production-2429.up.railway.app" {
18-
w.Header().Set("Access-Control-Allow-Origin", origin)
19-
}
16+
w.Header().Set("Access-Control-Allow-Origin", "*")
2017

2118
w.Header().Set("Access-Control-Allow-Credentials", "true")
2219
w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type")

0 commit comments

Comments
 (0)