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

JLRoutes 2.0.3 doesn't support host as parameter #89

Closed
danielebogo opened this issue Apr 7, 2017 · 7 comments
Closed

JLRoutes 2.0.3 doesn't support host as parameter #89

danielebogo opened this issue Apr 7, 2017 · 7 comments

Comments

@danielebogo
Copy link

Is it possible to switch between the possibility to keep the host as parameter?
This because this minor release affects all the app are using it with this behaviour.
I can suggest a pull request if you want.

@joeldev
Copy link
Owner

joeldev commented Apr 7, 2017

Ugh, I was wondering if anyone was depending on this. I'll have to add an option to control this behavior. The change to always use the host as a path component was not intentional and happened while the 2.0 rewrite was happening.

Can you give me an example of your addRoute:handler: call and a URL that was working in 2.0.2 but isn't in 2.0.3? Just want to make sure the change I make fixes your issue.

@joeldev
Copy link
Owner

joeldev commented Apr 8, 2017

I pushed 1af2a1c which likely fixes it, but I'm going to keep this open until you confirm your precise use-case and I can test it out. After we do that, I'll push another point release.

@danielebogo
Copy link
Author

Well we use this structure:

[ "https": [ "www.my_host_name.com/path/:placeholder/*", "...", "..." ] ]

Every url contains the complete path (host included). So the match doesn't work anymore cause the path elements doesn't contain the host, and the "canRoute" method returns always no.
Let me try this commit and i'll let you know.

@joeldev
Copy link
Owner

joeldev commented Apr 9, 2017

@danielebogo: okay, based on that comment I believe that this commit will fix your issue. Did you get a chance to try it? I'd like to release a new point update with the fix.

@danielebogo
Copy link
Author

@joeldev yes i've tried on a little side project i've and it works. Tomorrow morning i'll test it again with another one. But i'm sure it's fixed right now.

@joeldev
Copy link
Owner

joeldev commented Apr 9, 2017

Great! I'll push a release (2.0.4). Thanks for the help!

@joeldev joeldev closed this as completed Apr 9, 2017
@danielebogo
Copy link
Author

@joeldev thanks a lot! I tested it on my big project i.m working on and it works!

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

No branches or pull requests

2 participants