Formatting, wording
This commit is contained in:
parent
0774c88918
commit
a2100b23a9
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user