Only support primary domain for Lightning Address
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 3s

Part of the process of removing support for serving multiple domains
from a single akkounts instance.

Also puts the Lightning Address discovery routes under the .well-known
path. Combined, these changes simplify reverse-proxying to the
.well-known endpoints.
This commit is contained in:
2024-01-26 16:03:57 +02:00
parent eaf41e0835
commit a628a03f84
3 changed files with 28 additions and 33 deletions

View File

@@ -56,14 +56,12 @@ Rails.application.routes.draw do
end
end
get 'lnurlpay/:address', to: 'lnurlpay#index',
as: 'lightning_address', constraints: { address: /[^\/]+/}
get 'lnurlpay/:address/invoice', to: 'lnurlpay#invoice',
as: 'lnurlpay_invoice', constraints: { address: /[^\/]+/}
get 'keysend/:address', to: 'lnurlpay#keysend',
as: 'lightning_address_keysend', constraints: { address: /[^\/]+/}
get '.well-known/webfinger', to: 'webfinger#show'
get '.well-known/nostr', to: 'well_known#nostr'
get '.well-known/lnurlpay/:username', to: 'lnurlpay#index', as: 'lightning_address'
get '.well-known/keysend/:username', to: 'lnurlpay#keysend', as: 'lightning_address_keysend'
get 'lnurlpay/:username/invoice', to: 'lnurlpay#invoice', as: 'lnurlpay_invoice'
post 'webhooks/lndhub', to: 'webhooks#lndhub'
@@ -96,8 +94,6 @@ Rails.application.routes.draw do
}, controller: 'oauth'
end
get '.well-known/webfinger', to: 'webfinger#show'
namespace :discourse do
get "connect", to: 'sso#connect'
end