Remove hard-coded goodnight-lead.herokuapp.com in session URL's
Closed this issue · 3 comments
Session URL's start with goodnight-lead.herokuapp.com when running on my computer. Presumably this behaviour is independent of the host. Ideally the session URL should have the name of the host where it's currently running.
To fix: You can get the current domain name from the HTTP request.
This is configured in admin.py. See the comment I left. Django has no officially supported way of getting a request object in the place we need it to be in order to build a url. There are hacks, of course, such as getting it elsewhere and storing it as self.request, but that is not necessarily a better fix.
If you do find a better solution, feel free to implement it.
Eric Horton
On Jun 28, 2015, at 22:26, Sam Magura notifications@github.com wrote:
Session URL's start with goodnight-lead.herokuapp.com when running on my computer. Presumably this behaviour is independent of the host. Ideally the session URL should have the name of the host where it's currently running.
To fix: You can get the current domain name from the HTTP request.
—
Reply to this email directly or view it on GitHub.
Your environment variable solution is fine for development, but presumably that environment variable will not be set on leadlabdemo.herokuapp.com, right?
I have another solution in mind that I will probably implement eventually. Not an urgent issue.
Heroku fully supports setting any environment variables an needed for app configuration.
Eric Horton
On Jun 28, 2015, at 22:41, Sam Magura notifications@github.com wrote:
Your environment variable solution is fine for development, but presumably that environment variable will not be set on leadlabdemo.herokuapp.com, right?
I have another solution in mind that I will probably implement eventually. Not an urgent issue.
—
Reply to this email directly or view it on GitHub.