Mark upload show paths as is_asset_path (#8365)

* this is to avoid excessive rate limiting, especially
  for secure media on media-heavy topics
This commit is contained in:
Martin Brennan 2019-11-18 15:56:20 +10:00 committed by Sam
parent d28de23ac8
commit af0cc89b11
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@ class UploadsController < ApplicationController
skip_before_action :preload_json, :check_xhr, :redirect_to_login_if_required, only: [:show, :show_short, :show_secure]
protect_from_forgery except: :show
before_action :is_asset_path, only: [:show, :show_short, :show_secure]
def create
# capture current user for block later on
me = current_user