wordpress插件写在模板里,德兴网站seo,室内设计装修用啥软件,怎么做网站的浏览量统计1.跨域问题说明#xff1a;后端域名为A.abc.com#xff0c;前端域名为B.abc.com。2.后端设置一个cookie发送给前台#xff0c;domain应该是setDomain(“abc.com”)#xff0c;而不是setDomain(“B.abc.com”)3.另外#xff0c;还要实现WebMvcConfigurerr配置加入Cors的跨域…1.跨域问题说明后端域名为A.abc.com前端域名为B.abc.com。2.后端设置一个cookie发送给前台domain应该是setDomain(“abc.com”)而不是setDomain(“B.abc.com”)3.另外还要实现WebMvcConfigurerr配置加入Cors的跨域Configurationpublic classWebConfig implements WebMvcConfigurer {Overridepublic voidaddCorsMappings(CorsRegistry registry) {registry.addMapping(/**).allowedOrigins(*).allowedMethods(GET, POST, OPTIONS, PUT).allowedHeaders(Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method,Access-Control-Request-Headers).exposedHeaders(Access-Control-Allow-Origin, Access-Control-Allow-Credentials).allowCredentials(true).maxAge(3600);}}--------------------------------------------分割线2018-9-16--------------------------------由于之前的项目要搬到springcloud上面所有就有了zuul网关来管理所有的请求之前cookie设置的请求头Authoriaztion居然没有被传到前端。凉凉……设置网关层跨域问题都已经全部允许任何请求头(下图)但是还是前端访问还是没有Authoriaztion各种问题都排查了都没有问题。。。大写的迷惘后来啊干脆把Authoriaztion名字给改了直接改为token。艹居然可以了前端能拿到token改回Authoriaztion没有。。。后来查了资料才发现哦zuul会默认过滤掉几个敏感词没错就是它/*** List of sensitive headers that are not passed to downstream requests. Defaults to a* safe set of headers that commonly contain user credentials. Its OK to remove* those from the list if the downstream service is part of the same system as the* proxy, so they are sharing authentication data. If using a physical URL outside* your own domain, then generally it would be a bad idea to leak user credentials.*/private Set sensitiveHeaders new LinkedHashSet(Arrays.asList(Cookie, Set-Cookie, Authorization));而我刚好就中奖了