Skip to content
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

Fix generation of URLs with a ROOT_URL containing a path #691

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexanderS
Copy link

This fixes #684.

The replacement of the basePath was missing one slash and so the generated url contained a double slash and fails to match the correct route.

@aadamsx
Copy link

aadamsx commented Sep 28, 2016

@AliexanderS would you mind submitting this PR to FineRouter too?

EDIT: @AliexanderS FineRouter has commit history.

@rubberduck203
Copy link

Hey guys. I know what it's like to have a bunch of PRs to review and test, but if this PR fixes the problem, that solves a big issue downstream for a ton of wekan users. Any chance this will get merged anytime soon?

@Serubin
Copy link

Serubin commented Feb 20, 2017

A slightly nicer fix would be:

var pathWithoutBase = completePath.replace(new RegExp('^(\/)|' + basePath), '');

dr-dimitru added a commit to veliovgroup/flow-router that referenced this pull request Feb 23, 2017
 - Fix generation of URLs with a ROOT_URL containing a path, see [PR
kadirahq#691](kadirahq#691)
dr-dimitru added a commit to veliovgroup/flow-router that referenced this pull request Feb 23, 2017
 - Fix for cases when route's param isn't String
 - Fix broken redirects in triggers
 - Fix exception on `new Route()` without arguments
 - Preserve `%` and `+` symbols in URI
 - Allow to use triggersEnter in Group without Array, see [PR
kadirahq#659](kadirahq#659)
 - Fix generation of URLs with a ROOT_URL containing a path, see [PR
kadirahq#691](kadirahq#691)
 - Support RegEx ([0-9]*) in .path, see [PR
kadirahq#654](kadirahq#654)
 - Fix nested groups on server, see [PR
kadirahq#663](kadirahq#663)
 - Same behavior for Server groups, as for groups on Client
 - Add auto-tests
 - NPM Dependencies update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting ROOT_URL with a path causes FlowRouter.url() to report incorrect url
4 participants