mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 19:42:32 -05:00
c04bcf8655
Organise all initializers so they are properly ordered and use the same naming scheme
14 lines
246 B
Ruby
14 lines
246 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
|
|
|