I am using the Apartment gem with Unicorn and Nginx. I am using the Subdomain elevator. In initializers/apartment/subdomain_exclusions
I have Apartment::Elevators::Subdomain.excluded_subdomains = ['www']
My understanding is that the public schema should now be used either with the public subdomain, www subdomain, or no subdomain ie mydomain.com.
However, it doesn't work this way. When I use www or no subdomain, it uses the last accessed schema. So if I was just using another subdomain, it will use that schema. This is not good. I have even tried adding config.default_schema = "public"
but this does nothing.
Any ideas why this is not working? Does anyone have it setup in a similar way and only public schema is used when no subdomain is specified? Is it possibly Nginx configuration?