mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: limit assets less that non asset paths
By default assets can be requested up to 200 times per 10 seconds from the app, this includes CSS and avatars
This commit is contained in:
@ -659,6 +659,10 @@ class ApplicationController < ActionController::Base
|
||||
render_to_string status: status, layout: layout, formats: [:html], template: '/exceptions/not_found'
|
||||
end
|
||||
|
||||
def is_asset_path
|
||||
request.env['DISCOURSE_IS_ASSET_PATH'] = 1
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def render_post_json(post, add_raw = true)
|
||||
|
Reference in New Issue
Block a user