From 2092d5c0ad099e8f60eb001ee0cd647fc759aefc Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 1 Jul 2018 04:12:34 +0200 Subject: 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 --- app/controllers/statuses_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/controllers/statuses_controller.rb') diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index 645995c2a..b85341822 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -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 -- cgit