diff --git a/paymentproxy/proxy.go b/paymentproxy/proxy.go index 99539859d..3c62c59f6 100644 --- a/paymentproxy/proxy.go +++ b/paymentproxy/proxy.go @@ -93,6 +93,13 @@ func (p *PaymentProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { } return } + + if r.Method == "OPTIONS" { + enableCors(w.Header()) + w.WriteHeader(http.StatusOK) + return + } + v, err := parseVoucher(r.URL.Query()) if err != nil { p.handleError(w, r, createPaymentError(fmt.Errorf("could not parse voucher: %w", err)))