diff --git a/invoice_manager.go b/invoice_manager.go index 434c960..086e959 100644 --- a/invoice_manager.go +++ b/invoice_manager.go @@ -36,6 +36,7 @@ func (m *InvoiceManager) handleInvoiceCreation(config ServerConfig) http.Handler return func(w http.ResponseWriter, r *http.Request) { log.Infof("Handling invoice creation: %v\n", *r) w.Header().Set("Content-Type", "application/json") + w.Header().Set("Access-Control-Allow-Origin", "*") keys, hasAmount := r.URL.Query()["amount"] if !hasAmount || len(keys[0]) < 1 { diff --git a/main.go b/main.go index 22c9a6f..fb17cc3 100644 --- a/main.go +++ b/main.go @@ -151,6 +151,7 @@ func handleLNUrlp(config ServerConfig, metadata string) http.HandlerFunc { Callback: config.InvoiceCallback, } w.Header().Set("Content-Type", "application/json") + w.Header().Set("Access-Control-Allow-Origin", "*") w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(resp) }