mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
PERF: reduce storage requirements for incoming links
Only store incoming links for topics.
This commit is contained in:
@ -36,7 +36,6 @@ class ApplicationController < ActionController::Base
|
||||
before_filter :disable_customization
|
||||
before_filter :block_if_readonly_mode
|
||||
before_filter :authorize_mini_profiler
|
||||
before_filter :store_incoming_links
|
||||
before_filter :preload_json
|
||||
before_filter :check_xhr
|
||||
before_filter :redirect_to_login_if_required
|
||||
@ -313,10 +312,6 @@ class ApplicationController < ActionController::Base
|
||||
Rack::MiniProfiler.authorize_request
|
||||
end
|
||||
|
||||
def store_incoming_links
|
||||
IncomingLink.add(request, current_user) unless request.xhr?
|
||||
end
|
||||
|
||||
def check_xhr
|
||||
# bypass xhr check on PUT / POST / DELETE provided api key is there, otherwise calling api is annoying
|
||||
return if !request.get? && api_key_valid?
|
||||
|
Reference in New Issue
Block a user