-
Notifications
You must be signed in to change notification settings - Fork 69
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 support for rootURL #53
Comments
I have the same issue for the same use case, FastBoot is ignoring my let router = appInstance.lookup('router:main');
router.rootURL = `/${language}/`; inside an instance initializer. |
Is this also generated in links, or are you just expecting a redirect when you visit |
Changing the rootURL makes all the links change as well. I'm doing this to "mount" my routes to the correct language prefix and to have different URLs for different languages. |
I actually think this is a bug in the visit API since fastboot is providing it all the information it needs (the full path).
I wouldn't expect it to redirect, but to assert like the router currently does when the requested URL doesn't start with the specified rootURL.
It doesn't.
<!-- trimmed the output -->
<a id="ember995" href="/test" class="ember-view">test</a> client-side <!-- trimmed the output -->
<a id="ember385" href="/en/test" class="ember-view">test</a> Did some investigating, I believe this to be an issue with the So I believe this is two bugs:
|
I can confirm that FastBoot doesn't work when
I got it working (using extreme monkey patching) by adding the code from this Gist into |
Sounds like a bug in the |
I think you can close this one and track the issue in emberjs/ember.js#13464. |
I released a tiny addon to unblock, |
When using rootURL on the router, FastBoot completely ignores it and runs the app with the default rootURL
/
.Here's a repo to test it: https://github.com/thorsteinsson/ember-fastboot-rooturl
The text was updated successfully, but these errors were encountered: