5 Commits

Author SHA1 Message Date
raucao 8f7994d82e 0.10.0
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2024-09-18 15:49:07 +02:00
raucao a7d0e71ab6 Fix spec
continuous-integration/drone/push Build is passing
2024-09-18 14:46:46 +02:00
raucao 27d9f73c61 Set host for RS auth url
continuous-integration/drone/push Build is failing
With X-Forwarded-Host set on the proxied request, Rails uses that host
for URLs. But we need it to be the accounts domain.
2024-09-14 17:17:09 +02:00
raucao ed3de8b16f Allow CORS for all LNURL endpoints
continuous-integration/drone/push Build is passing
2024-09-14 16:46:14 +02:00
raucao d7b4c67953 Fix config when set to empty string
continuous-integration/drone/push Build is passing
2024-09-14 16:40:22 +02:00
7 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -1,7 +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] before_action :set_cors_access_control_headers
MIN_SATS = 10 MIN_SATS = 10
MAX_SATS = 1_000_000 MAX_SATS = 1_000_000
+1 -1
View File
@@ -74,7 +74,7 @@ class WebfingerController < WellKnownController
end end
def remotestorage_link def remotestorage_link
auth_url = new_rs_oauth_url(@username) auth_url = new_rs_oauth_url(@username, host: Setting.accounts_domain)
storage_url = "#{Setting.rs_storage_url}/#{@username}" storage_url = "#{Setting.rs_storage_url}/#{@username}"
{ {
+1 -1
View File
@@ -12,7 +12,7 @@ class WellKnownController < ApplicationController
if params[:name] == "_" if params[:name] == "_"
if domain == Setting.primary_domain if domain == Setting.primary_domain
# pubkey for the primary domain without a username (e.g. kosmos.org) # pubkey for the primary domain without a username (e.g. kosmos.org)
res = { names: { "_": Setting.nostr_public_key_primary_domain || Setting.nostr_public_key } } res = { names: { "_": Setting.nostr_public_key_primary_domain.presence || Setting.nostr_public_key } }
else else
# pubkey for the akkounts domain without a username (e.g. accounts.kosmos.org) # pubkey for the akkounts domain without a username (e.g. accounts.kosmos.org)
res = { names: { "_": Setting.nostr_public_key } } res = { names: { "_": Setting.nostr_public_key } }
-2
View File
@@ -205,9 +205,7 @@
) %> ) %>
</td> </td>
<td class="text-right"> <td class="text-right">
<% if @user.nostr_pubkey.present? %>
<%= link_to "Open profile", "https://njump.me/#{@user.nostr_pubkey_bech32}", class: "btn-sm btn-gray" %> <%= link_to "Open profile", "https://njump.me/#{@user.nostr_pubkey_bech32}", class: "btn-sm btn-gray" %>
<% end %>
</td> </td>
</tr> </tr>
<% end %> <% end %>
-2
View File
@@ -1,6 +1,4 @@
:concurrency: 2 :concurrency: 2
production:
:concurrency: 10
:queues: :queues:
- default - default
- mailers - mailers
+1 -1
View File
@@ -11,7 +11,7 @@
"postcss-preset-env": "^7.8.3", "postcss-preset-env": "^7.8.3",
"tailwindcss": "^3.2.4" "tailwindcss": "^3.2.4"
}, },
"version": "0.9.0", "version": "0.10.0",
"scripts": { "scripts": {
"build:css:tailwind": "tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css", "build:css:tailwind": "tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css",
"build:css": "yarn run build:css:tailwind" "build:css": "yarn run build:css:tailwind"
+1 -1
View File
@@ -92,7 +92,7 @@ RSpec.describe "WebFinger", type: :request do
expect(rs_link["href"]).to eql("#{Setting.rs_storage_url}/tony") expect(rs_link["href"]).to eql("#{Setting.rs_storage_url}/tony")
oauth_url = rs_link["properties"]["http://tools.ietf.org/html/rfc6749#section-4.2"] oauth_url = rs_link["properties"]["http://tools.ietf.org/html/rfc6749#section-4.2"]
expect(oauth_url).to eql("http://www.example.com/rs/oauth/tony") expect(oauth_url).to eql("http://accounts.kosmos.org/rs/oauth/tony")
end end
it "returns CORS headers" do it "returns CORS headers" do