-
Notifications
You must be signed in to change notification settings - Fork 412
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
Evaluate route paths relative to ROOT_URL parameter #848
Comments
I have the same issue |
Hi guys, IR does not currently support this. Potentially you could use a middleware in IR1.0 to re-write the URLs to achieve what you need. Not sure. |
This is on my radar. Need to think about whether/how the middleware mount option might support this.
|
@cmather did you try the middleware option? |
There's some discussion of this issue in #154 as well. |
I modified the |
I hit this issue too. I have a temporary fix in the form of the following monkey patch hack which is working for me, but an official fix would be nice // note: this hack will cause issues if any of your routes are expected to contain
// the same string used in your ROOT_URL_PATH_PREFIX, e.g. if you
// have the url http://yoursite.com/prefix/url/that/repeats/prefix/
(function() {
Iron.Url._oldParse = Iron.Url.parse;
Iron.Url.parse = function(url) {
if (__meteor_runtime_config__.ROOT_URL_PATH_PREFIX) {
url = url.replace(__meteor_runtime_config__.ROOT_URL_PATH_PREFIX, "");
}
return Iron.Url._oldParse(url);
};
})(); |
When running my meteor app in production mode, my ROOT_URL is defined as
www.mysite.com/prototype
.My router file is defined as such:
When going to
www.mysite.com/prototype
, I get aException in defer callback: Error: Oh no! No route found for path: "/prototype"
error.The route path should be evaluated as
/
instead of/prototype
because the ROOT_URL includes/prototype
.The text was updated successfully, but these errors were encountered: