* Rename SiteConfig * More renaming * Update spec * Update mandatory settings mapping * More renaming * e2e test fixes * You have a rename, and you have a rename * Spec fix * More changes * Temporarily disable specs * After-merge update * Undo rename for migration * undo rename of DUS * Fix DUS * Fix merge problem * Remove redundant DUS * Fix specs * Remove unused code * Change wrong class name * More cleanup * Re-add missing values to constant * Fix constant * Fix spec * Remove obsolete fields * Add accidentally removed field * Update spec * Move methods from Settings::General to ForemInstance * Remove unneeded model * Change mentions of 'site config'
15 lines
412 B
Ruby
15 lines
412 B
Ruby
module Middlewares
|
|
# Since we must explicitly set the cookie domain in session_store before SiteConfig is available,
|
|
# this ensures we properly set the cookie to SiteConfig.app_domain at runtime.
|
|
class SetCookieDomain
|
|
def initialize(app)
|
|
@app = app
|
|
end
|
|
|
|
def call(env)
|
|
env["rack.session.options"][:domain] = ".#{Settings::General.app_domain}"
|
|
|
|
@app.call(env)
|
|
end
|
|
end
|
|
end
|