Merge branch 'feature/170-nostr_zaps' into live
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
commit
f05eec5255
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user