mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 23:19:25 +08:00
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:
parent
d28de23ac8
commit
af0cc89b11
@ -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]
|
skip_before_action :preload_json, :check_xhr, :redirect_to_login_if_required, only: [:show, :show_short, :show_secure]
|
||||||
protect_from_forgery except: :show
|
protect_from_forgery except: :show
|
||||||
|
|
||||||
|
before_action :is_asset_path, only: [:show, :show_short, :show_secure]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
# capture current user for block later on
|
# capture current user for block later on
|
||||||
me = current_user
|
me = current_user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user