You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Route from '@ember/routing/route';
export default class FooIndexRoute extends Route {
redirect() {
this.transitionTo('foo.bar');
}
}
When a user navigates directly to mysite.com/foo, fastboot hits this line and instead of rendering the redirected page, it returns an anchor link which exposes the cdn resource.
<h1>Redirecting to <a href="${location}">${location}</a></h1>
I was able to get around this using a small hack but wondering if we should include an optional param to html() that would tell fastboot to render the redirected page?
const res = await this.fastboot.visit(
this.request.url,
{request: this.request},
);
if (res.statusCode >= 300 && res.statusCode <= 399) {
// trick fastboot into thinking it was a successful request.
res._fastbootInfo.response.statusCode = 200;
}
// render the pages html.
html = await res.html();
The text was updated successfully, but these errors were encountered:
I'm rendering a fastboot page on a cdn like so:
I have a route with nested child routes, and I want the index to redirect to the child like so:
When a user navigates directly to
mysite.com/foo
, fastboot hits this line and instead of rendering the redirected page, it returns an anchor link which exposes the cdn resource.<h1>Redirecting to <a href="${location}">${location}</a></h1>
I was able to get around this using a small hack but wondering if we should include an optional param to
html()
that would tell fastboot to render the redirected page?The text was updated successfully, but these errors were encountered: