Improve embeds (#7919)
* Make embeds cacheable by reverse proxy * Make follow button on embeds open remote follow modal Instead of web+mastodon://, also, turn the button blue, and add a sign up prompt to the remote follow modal
This commit is contained in:
@ -5,6 +5,7 @@ class RemoteFollowController < ApplicationController
|
||||
|
||||
before_action :set_account
|
||||
before_action :gone, if: :suspended_account?
|
||||
before_action :set_body_classes
|
||||
|
||||
def new
|
||||
@remote_follow = RemoteFollow.new(session_params)
|
||||
|
@ -46,7 +46,12 @@ class StatusesController < ApplicationController
|
||||
end
|
||||
|
||||
def embed
|
||||
raise ActiveRecord::RecordNotFound if @status.hidden?
|
||||
|
||||
skip_session!
|
||||
expires_in 180, public: true
|
||||
response.headers['X-Frame-Options'] = 'ALLOWALL'
|
||||
|
||||
render 'stream_entries/embed', layout: 'embedded'
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user