0
0
Fork 0

Support /.well-known/host-meta.json (#32206)

This commit is contained in:
Christian Schmidt 2024-10-02 11:23:44 +02:00 committed by GitHub
parent f0716368e6
commit 33d3ca7cf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 14 deletions

View file

@ -7,7 +7,23 @@ module WellKnown
def show
@webfinger_template = "#{webfinger_url}?resource={uri}"
expires_in 3.days, public: true
render content_type: 'application/xrd+xml', formats: [:xml]
respond_to do |format|
format.any do
render content_type: 'application/xrd+xml', formats: [:xml]
end
format.json do
render json: {
links: [
{
rel: 'lrdd',
template: @webfinger_template,
},
],
}
end
end
end
end
end