Merge branch 'feature/170-nostr_zaps' into live
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-19 16:48:28 +02:00

View File

@@ -1,6 +1,7 @@
class LnurlpayController < ApplicationController class LnurlpayController < ApplicationController
before_action :check_service_available before_action :check_service_available
before_action :find_user before_action :find_user
before_action :set_cors_access_control_headers, only: [:invoice]
MIN_SATS = 10 MIN_SATS = 10
MAX_SATS = 1_000_000 MAX_SATS = 1_000_000
@@ -61,6 +62,12 @@ class LnurlpayController < ApplicationController
private private
def set_cors_access_control_headers
headers['Access-Control-Allow-Origin'] = "*"
headers['Access-Control-Allow-Headers'] = "*"
headers['Access-Control-Allow-Methods'] = "GET"
end
def check_service_available def check_service_available
http_status :not_found unless Setting.lndhub_enabled? http_status :not_found unless Setting.lndhub_enabled?
end end