I have the following in REST Java Server side, but I am getting
Redirect was blocked for CORS request
How to fix this?
@POST
@Path("/details")
public void findDetails(@FormParam("productName")
String productName, @Context
HttpServletRequest request, @Context
HttpServletResponse response) {
URI location = new java.net.URI("http://www.google.com");
if (productName != null) {
return Response.temporaryRedirect(location).build();
}
}
Shouldn't
be
Or rename to