I am running a multi tenant app that uses subdomains for tenants on Heroku. In production I have a domain where subdomains point to my heroku app. (This all works fine)
For staging, I'd like to test without creating another domain. Since my app uses the first subdomain it sees to find the current tenant, I was hoping to use a url like: tenant.myapp.herokuapp.com. However, this is not working (heroku returns a 'no such app' error.)
I've found this post from 2 years ago that says it should be possible, but I don't see this add-on/option anymore in the referenced documentation.
I have tried adding the subdomains as a wildcard in heroku by running
heroku domains:add *.myapp.herokuapp.com
but this returned
! Trying to hijack another Heroku app? Tsk, tsk.
Does anyone know if this can still be accomplished and if so, how?
note: I'm currently using my staging environment by CNAMING *.staging.myapp.com to myapp.heroku.com, but would like to clean that up.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…