mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
PERF: move message bus to the front of the middleware stack
Organise all initializers so they are properly ordered and use the same naming scheme
This commit is contained in:
@ -1,17 +0,0 @@
|
||||
# tiny middleware to force https if needed
|
||||
class Discourse::ForceHttpsMiddleware
|
||||
|
||||
def initialize(app, config={})
|
||||
@app = app
|
||||
end
|
||||
|
||||
def call(env)
|
||||
env['rack.url_scheme'] = 'https' if SiteSetting.use_https
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# this code plays up, skip for now
|
||||
#Rails.configuration.middleware.insert_before MessageBus::Rack::Middleware, Discourse::ForceHttpsMiddleware
|
||||
|
Reference in New Issue
Block a user