These are the annotations I use in my interface

@Path("/for")
@Produces("application/json")
@Consumes("application/json")
public interface CustomerService {


      @POST
      @Produces("application/json")
      @Consumes("application/json")
      @CrossOriginResourceSharing(
                allowAllOrigins = true,
                        allowHeaders = {
                        "content-type:application/json"
                     },
                     exposeHeaders = {
                        "content-type:application/json"
                     }
             )

Response addMember(Customer customer);

My POST request from Javascript client is getting preflighted and
Http-Method turns to OPTIONS and Content-Type to blank.
What are the right configurations to avoid preflight and make a
successful POST with content-type: application/json

Appreciate any help

regards
Ramesh




Reply via email to