Formatting, wording
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Update release notes draft

This commit is contained in:
Râu Cao 2023-04-11 11:41:30 +02:00
parent 0774c88918
commit a2100b23a9
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,5 @@
class WebfingerController < ApplicationController class WebfingerController < ApplicationController
before_action :allow_cross_origin_requests, only: [:show]
before_action :allow_cross_origin, :only => [:show]
layout false layout false
@ -51,9 +50,8 @@ class WebfingerController < ApplicationController
} }
end end
def allow_cross_origin def allow_cross_origin_requests
headers['Access-Control-Allow-Origin'] = '*' headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, OPTIONS' headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, OPTIONS'
end end
end end

View File

@ -7,7 +7,7 @@ RSpec.describe "WebFinger", type: :request do
create :user, cn: 'tony', ou: 'kosmos.org' create :user, cn: 'tony', ou: 'kosmos.org'
end end
context "remoteStorage service enabled" do context "remoteStorage enabled globally" do
it "includes the remoteStorage link for the user" do it "includes the remoteStorage link for the user" do
get "/.well-known/webfinger?resource=acct%3Atony%40kosmos.org" get "/.well-known/webfinger?resource=acct%3Atony%40kosmos.org"
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
@ -22,7 +22,7 @@ RSpec.describe "WebFinger", type: :request do
end end
end end
context "remoteStorage service disabled" do context "remoteStorage not available" do
before do before do
Setting.remotestorage_enabled = false Setting.remotestorage_enabled = false
end end