-
Notifications
You must be signed in to change notification settings - Fork 801
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
Add base url support #140
Add base url support #140
Conversation
What's blocking this PR from being merged? |
@KingDuckZ @doodadjs I think the requirement to use a proxy server is an issue. I'd prefer if we could get a solution that would for the server-side as well. The issue there is that there's currently no data passed between the two layers. I've started on a branch to do this, but I'm not ready to merge it yet. If someone else is interested it shouldn't be too difficult to get going, but I don't want to bring in a feature (as much as I appreciate the work here) that's half complete. Otherwise, I'd be down to take a look this weekend and try to get something that works for both cases. |
@seejohnrun I understand. I wanted to touch less code than possible, but that's not enough. |
This works so well for me while proxying via Nginx and I think would be beneficial for others. |
You should always deploy applications behind a reverse proxy in production - it allows the use of HTTPS, ratelimiting, caching, and fail2ban. People who don't want to use reverse proxy can just not use a base URL. There's no need to use a base URL if you don't have a reverse proxy, because there is nothing else you can serve |
Something that would solve relevant upstream issues/prs: toptal#53 toptal#140
This PR is stale because it has been open for 30 days with no activity. |
Any progress on merging this? |
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.
Working changes, tested on Ngnix with http://base_url/customdir
Any update on this? |
Hi. A friend of mine asked for help to use your application with another base URL than root. I did it for him and now I'm sharing my changes to the community. There is only two files changed in the front end. The back end has not been touched. Don't forget to clear the cache of the browser before trying if you've already used it (I had this issue).
For the back end, you have to use a proxy server implementing a rewrite of the requested urls. See http://www.ctrl-alt-del.cc/2014/11/haste-server-base-url-hackpatch.html
I hope that it will work fine for you.