fix: add cors to merkle proof endpoint

This commit is contained in:
Arseniy Klempner 2024-03-27 19:44:47 -07:00
parent 6c4bc43016
commit cd8fa7e604
No known key found for this signature in database
GPG Key ID: 59967D458EFBF01B

View File

@ -77,6 +77,7 @@ type MerkleProofResponse struct {
}
func (d *DebugService) getV1MerkleProof(w http.ResponseWriter, req *http.Request) {
enableCors(&w)
commitmentReq := chi.URLParam(req, "commitment")
if commitmentReq == "" {
writeErrResponse(w, nil, fmt.Errorf("commitment is empty"), http.StatusBadRequest)