Skip to content

Commit

Permalink
Tried again to handle CORS. Same approach, different details
Browse files Browse the repository at this point in the history
  • Loading branch information
mbuchoff committed Sep 10, 2023
1 parent 7c48697 commit 9a6cc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func main() {
AllowedHeaders: []string{"*"},
AllowCredentials: false,
})
handler := cors.Handler(mux)

// Start the web server using net/http

Expand All @@ -36,6 +35,7 @@ func main() {
// Write the response body
json.NewEncoder(w).Encode(dto.Response{Message: "OK"})
})
handler := cors.Handler(mux)

// Post endpoint to receive the phrase to be translated
mux.HandleFunc("/question", handlers.AnswerQuestion)
Expand Down

0 comments on commit 9a6cc5a

Please sign in to comment.