Skip to content

Commit e1f58ea

Browse files
authored
Merge pull request #220 from shivasurya/shiva/cors-fix
fix/playground: add cpf main website to cors allowlist
2 parents f34079b + 91be939 commit e1f58ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

playground/pkg/middleware/cors.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import "net/http"
55
// CorsMiddleware adds CORS headers to allow requests from localhost:4321 during development
66
func CorsMiddleware(next http.Handler) http.Handler {
77
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
8-
// Allow requests from localhost:4321 during development
9-
w.Header().Set("Access-Control-Allow-Origin", "http://localhost:4321")
8+
w.Header().Set("Access-Control-Allow-Origin", "https://codepathfinder.dev")
109
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
1110
w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
1211

0 commit comments

Comments
 (0)