We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5543ca commit 9fba37aCopy full SHA for 9fba37a
1 file changed
backend/internal/middleware/cors/cors.go
@@ -5,11 +5,10 @@ import
5
6
)
7
8
-func CORS(next http.Handler) http.Handler {
+func CORS(next http.Handler, clientURL string) http.Handler {
9
10
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
11
- url:="https://scintillating-commitment-production-2429.up.railway.app/"
12
- w.Header().Set("Access-Control-Allow-Origin", url)
+ w.Header().Set("Access-Control-Allow-Origin", clientURL)
13
14
w.Header().Set("Access-Control-Allow-Credentials", "true")
15
0 commit comments