Skip to content

Commit

Permalink
HTTPS header lol
Browse files Browse the repository at this point in the history
  • Loading branch information
slashexx committed Nov 4, 2024
1 parent e63f122 commit a77ac3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/api-gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type CodeRequest struct {
}

func enableCors(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "http://codebrewery.vercel.app")
w.Header().Set("Access-Control-Allow-Origin", "https://codebrewery.vercel.app")
w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
}
Expand Down
2 changes: 1 addition & 1 deletion backend/code-execution-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func executeCode(language string, code string) (string, error) {
}

func enableCors(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "http://codebrewery.vercel.app") // Allow your Vercel frontend
w.Header().Set("Access-Control-Allow-Origin", "https://codebrewery.vercel.app") // Allow your Vercel frontend
w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
}
Expand Down

0 comments on commit a77ac3f

Please sign in to comment.