在内部重定向到新网站时,如何停止URL更改。
@POST
@Path("/redirectcall")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.TEXT_PLAIN)
public Response makerdCall(@FormDataParam("msg") String msg, @FormDataParam("obj") String obj) throws Exception {
return Response.temporaryRedirect(new URI("https://abcexample.com"))
.header("Access-Control-Allow-Origin", "https://xyzexample.com")
.header("Access-Control-Allow-Methods", "POST, GET, PUT, UPDATE, OPTIONS")
.header("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With")
.header("Access-Control-Allow-Credentials", "true")
.header("Location","/hello")
.build();