Your location:Tech News>News>Script>Solution java example explanation request cross-domain problem

Latest News

Solution java example explanation request cross-domain problem

Author:fsadmin

Views:

  public static HttpServletResponse SetHttpServletResponse (

  HttpServletResponse response) {

  response.setHeader ( "Access-Control-Allow-Origin", "*");

  response.setHeader ( "Access-Control-Allow-Methods",

  "POST, GET, OPTIONS, DELETE");

  response.setHeader ( "Access-Control-Max-Age", "3600");

  response.setHeader ( "Access-Control-Allow-Headers", "x-requested-with");

  return response;

  }

Recommend article

Relate article