美文网首页
2020-07-02 Java后端跨域设置

2020-07-02 Java后端跨域设置

作者: lodtap | 来源:发表于2020-07-02 16:53 被阅读0次

    response.setContentType("application/octet-stream; charset=UTF-8");

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

     response.setHeader("Access-Control-Allow-Credentials", "true");

    response.setHeader("Access-Control-Allow-Methods", "POST,GET,OPTIONS,DELETE,PATCH,PUT");

    response.setHeader("Access-Control-Allow-Headers", "Origin,X-Requested-With,x-requested-with,X-Custom-Header," +"Content-Type,Accept,Authorization");

    相关文章

      网友评论

          本文标题:2020-07-02 Java后端跨域设置

          本文链接:https://www.haomeiwen.com/subject/dpvrqktx.html