Class: Fedipub::Server::WebFingerController
- Inherits:
-
Fedipub::ServerController
- Object
- ActionController::Base
- Fedipub::ServerController
- Fedipub::Server::WebFingerController
- Defined in:
- app/controllers/fedipub/server/web_finger_controller.rb
Instance Method Summary collapse
Methods inherited from Fedipub::ServerController
Instance Method Details
#find ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/fedipub/server/web_finger_controller.rb', line 6 def find case resource = params.require(:resource) when %r{^https?://#{Fedipub::Utils::Host.localhost}/?$} @actor = Fedipub::Actor.application_actor when %r{^https?://.+} @actor = Fedipub::Actor.find_by_federation_url!(resource) # rubocop:disable Rails/DynamicFindBy when /^acct:.+/ @actor = Fedipub::Actor.find_local_by_username(username) raise Fedipub::Actor::TombstonedError if @actor&.tombstoned? end raise ActiveRecord::RecordNotFound if @actor.nil? render formats: [:jrd] end |
#host_meta ⇒ Object
23 24 25 26 27 |
# File 'app/controllers/fedipub/server/web_finger_controller.rb', line 23 def render formats: [:xrd] end |