Skip to content

Commit

Permalink
fix: set CORS header at the earliest
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikazechaser committed Dec 17, 2024
1 parent 74c5783 commit a4f05b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var (
)

func (a *API) ccipHandler(w http.ResponseWriter, req bunrouter.Request) error {
w.Header().Set("Access-Control-Allow-Origin", "*")
r := CCIPParams{
Sender: req.Param("sender"),
}
Expand Down Expand Up @@ -104,7 +105,6 @@ func (a *API) ccipHandler(w http.ResponseWriter, req bunrouter.Request) error {
}
a.logg.Debug("signed payload", "payload", payload)

w.Header().Set("Access-Control-Allow-Origin", "*")
return httputil.JSON(w, http.StatusOK, CCIPOKResponse{
Data: payload,
})
Expand Down

0 comments on commit a4f05b8

Please sign in to comment.