| | |
| | |
|
| | | import cc.mrbird.febs.common.interceptor.LoginInterceptor;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
|
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
| | |
| | | registration.excludePathPatterns("/api/news/**");
|
| | | registration.excludePathPatterns("/api/member/cashOutSetting");
|
| | | registration.excludePathPatterns("/api/member/agentDetail");
|
| | | registration.excludePathPatterns("/api/member/activityInfo");
|
| | | registration.excludePathPatterns("/api/leader/leaderList");
|
| | | registration.excludePathPatterns("/api/leader/leaderListInFence");
|
| | | registration.excludePathPatterns("/api/leader/noLoginLeaderTitle");
|
| | | registration.excludePathPatterns("/api/xcxPay/wxpayCallback");
|
| | | registration.excludePathPatterns("/api/xcxPay/rechargeCallBack");
|
| | | registration.excludePathPatterns("/api/wechat/reply/event");
|
| | | }
|
| | |
|
| | | /**
|
| | | * 设置cors跨域支持
|
| | | *
|
| | | * @param registry
|
| | | */
|
| | | @Override
|
| | | public void addCorsMappings(CorsRegistry registry){
|
| | | //设置允许跨域的路径
|
| | | registry.addMapping ("/**")
|
| | | //设置允许跨域请求的域名
|
| | | .allowedOrigins ("*")
|
| | | //是否允许证书
|
| | | .allowCredentials (true)
|
| | | //设置允许的方法
|
| | | .allowedMethods ("GET","POST", "OPTIONS")
|
| | | //设置允许的header属性
|
| | | .allowedHeaders ("*")
|
| | | //允许跨域时间
|
| | | .maxAge (3600);
|
| | | }
|
| | | }
|