discourse/config/initializers/50-force_https.rb
Robin Ward cd1dd18f01 Revert "PERF: move message bus to the front of the middleware stack"
I suspect this commit is preventing Sidekiq from running inprocess.
2015-12-07 14:57:23 -05:00

17 lines
390 B
Ruby

# 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