Add alternate links to ActivityPub resources from HTML/HEAD variants (#4586)
This commit is contained in:
parent
b7370ac8ba
commit
a2aeacbfee
7 changed files with 24 additions and 4 deletions
|
@ -38,7 +38,12 @@ class StreamEntriesController < ApplicationController
|
|||
end
|
||||
|
||||
def set_link_headers
|
||||
response.headers['Link'] = LinkHeader.new([[account_stream_entry_url(@account, @stream_entry, format: 'atom'), [%w(rel alternate), %w(type application/atom+xml)]]])
|
||||
response.headers['Link'] = LinkHeader.new(
|
||||
[
|
||||
[account_stream_entry_url(@account, @stream_entry, format: 'atom'), [%w(rel alternate), %w(type application/atom+xml)]],
|
||||
[ActivityPub::TagManager.instance.uri_for(@stream_entry.activity), [%w(rel alternate), %w(type application/activity+json)]],
|
||||
]
|
||||
)
|
||||
end
|
||||
|
||||
def set_stream_entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue