We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd21e23 commit b853835Copy full SHA for b853835
lib/tenant/middleware.rb
@@ -11,10 +11,10 @@ def call(env)
11
request = ActionDispatch::Request.new(env)
12
if request.path == "/up"
13
@app.call(env)
14
- elsif PublicSuffix.parse(request.host).domain == ENV["APP_DOMAIN"]
15
- @app.call(env)
16
elsif tenant = Tenant.find_by(host: request.host)
17
Tenant.switch(tenant) { @app.call(env) }
+ elsif PublicSuffix.parse(request.host).domain == ENV["APP_DOMAIN"]
+ @app.call(env)
18
else
19
[ 404, {}, [ "Not Found" ] ]
20
end
0 commit comments