mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:34:57 +08:00
introduce rack:cache as a default, so users don't need to configure apache or nginx
under rack cache we are able to serve 620reqs a second per thin (on my machine) before it 12 (on my machine) reorganised so mini profilers can be cleanly disabled from config file added caching for categories index move production.rb to production.sample.rb
This commit is contained in:
@ -1,5 +1,11 @@
|
||||
module CurrentUser
|
||||
|
||||
def self.has_auth_cookie?(env)
|
||||
request = Rack::Request.new(env)
|
||||
cookie = request.cookies["_t"]
|
||||
!cookie.nil? && cookie.length == 32
|
||||
end
|
||||
|
||||
def self.lookup_from_env(env)
|
||||
request = Rack::Request.new(env)
|
||||
lookup_from_auth_token(request.cookies["_t"])
|
||||
|
Reference in New Issue
Block a user