Closed almothafar closed 8 years ago
I solved it with changing redirectToUI
method to :
@Inject
private GulpAssets gulpAssets;
public play.api.mvc.Action<AnyContent> redirectToUI(String any) {
return gulpAssets.index();
}
So it is return return gulpAssets.index();
instead of : return CompletableFuture.completedFuture(Results.redirect("/ui/").as("text/html"));
Thanks, was my mistake :)
Hi, I have an issue, i'm trying to make OAuth integration with my application, the problem is that When I go outside my webpage to login using Stripe as example, and comeback with parameter, its ignores the parameter, and event ignore that last place I was in and instead, I redirected to default page, as example: My default page :
/ui/admin/home
I go to :
/ui/admin/profile
, then I click that button which redirect me to login page for Stripe, when I logged in I returned to the last page like/ui/admin/profile?scope=read_write&code=AUTHORIZATION_CODE
but actually I just get the angular reloaded to/ui/admin/home
When I run the gulp serve externally I don't have this issue, I can refresh
/ui/admin/profile
and stay where I was, but inside the play I always return only to home page.It's not about the parameter issue, I was just explain my story here, to clarify my issue:
The problem here that When I refresh page I lost it and instead I return to the default page, I can see that when I refresh the page I get the address in browser returns always to
/ui/
then to the default state.My routes:
for
redirectToUI
function I tried to return :or
return gulpAssets.redirectRoot("/ui/");
Why this method? because without it I get error 404 if I refreshed page.
And why /admin routes because access to /ui/ without /admin or /view or whatever after /ui/ I get the following exception:
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:9000/ui/".
And(index):1 Uncaught SyntaxError: Unexpected token <
Tens of times in console and page not loaded, just screen with plan text with broken styles and images.