-
Notifications
You must be signed in to change notification settings - Fork 0
Angular JWT
Kais NAFFOUTI edited this page Apr 20, 2018
·
2 revisions
@OPTIONS @Path("/getsample") public Response getOptions() { return Response.ok() .header("Access-Control-Allow-Origin", "*") .header("Access-Control-Allow-Methods", "POST, GET, PUT, UPDATE, OPTIONS") .header("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With").build(); }
dans le web services
If non of this work, try to exchange the "" provided for "Access-Control-Allow-Origin" header with your custom domain where you access this resource. I.g. If you call this from http://localhost::8080 use something like this ("Access-Control-Allow-Origin", "http://localhost:8080") instead of asterisk ""