Commit 9479f470 authored by xuhuanchao's avatar xuhuanchao

跨域

parent c82fc92f
...@@ -13,18 +13,13 @@ import org.springframework.web.server.WebFilter; ...@@ -13,18 +13,13 @@ import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain; import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
/**
* 跨域配置
*
* @author ruoyi
*/
@Configuration @Configuration
public class CorsConfig public class CorsConfig
{ {
/** /**
* 这里为支持的请求头,如果有自定义的header字段请自己添加 * 这里为支持的请求头,如果有自定义的header字段请自己添加
*/ */
private static final String ALLOWED_HEADERS = "X-Requested-With, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, Admin-Token, App-Token"; private static final String ALLOWED_HEADERS = "X-Requested-With, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, Admin-Token, App-Token, istoken";
private static final String ALLOWED_METHODS = "GET,POST,PUT,DELETE,OPTIONS,HEAD"; private static final String ALLOWED_METHODS = "GET,POST,PUT,DELETE,OPTIONS,HEAD";
private static final String ALLOWED_ORIGIN = "*"; private static final String ALLOWED_ORIGIN = "*";
private static final String ALLOWED_EXPOSE = "*"; private static final String ALLOWED_EXPOSE = "*";
...@@ -55,3 +50,4 @@ public class CorsConfig ...@@ -55,3 +50,4 @@ public class CorsConfig
}; };
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment