-
-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the same host as origin for single-server setups #1432
Conversation
This parameter is intended to determine if a Grist installation is a single URL installation or not. If it is, we can serve URLs from the same source as the browser request.
This should handle the most common case of a single Grist site with a single server, removing the need for the user to set up APP_HOME_URL in this case.
56be4f8
to
31f41d9
Compare
These tests are for single-server setups that don't need this setting.
fb6de66
to
72e6c92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jordi! Looks plausible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously when we've talked about changes to APP_HOME_URL, we came to the conclusion it would be better if the frontend just used the current domain anyway:
As there's issues with reverse proxies not passing the Host header through, and the backend getting confused about what domain it's hosted on.
(Not sure if this is helpful, just relevant context)
72e6c92
to
ae1902f
Compare
ae1902f
to
12f0f11
Compare
8ede53d
to
09befb7
Compare
@jordigh Hmm this landed before I got to post this but: I ran a version of this PR against our saas tests (since it touches url handling which is fiddly) and there were some failures https://phab.getgrist.com/harbormaster/unit/20870/. I expect there may be small things to patch up, didn't see any red flag. |
Context
Self-hosters often immediately face an obstacle by not setting
APP_HOME_URL
and getting a broken installation. There is no reason why this URL should be set in the most common case of a single server.Proposed solution
We check to see if the user has not set
APP_HOME_URL
or encoded organisations as subdomains. In that case, we serve back the same origin as what we obtained from the browser request.Has this been tested?
I removed the
APP_HOME_URL
setting from the tests that didn't need it and they still pass.