提交 d8ad7f05 编写于 作者: 郝先瑞

refactor: nacos配置错误提示语优化

上级 c3fc28eb
......@@ -56,7 +56,7 @@ public class ResourceServerConfig {
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
if (ignoreUrls == null) {
log.error("网关白名单路径读取失败,Nacos 配置读取失败,请检查相关配置!!!");
log.error("网关白名单路径读取失败:Nacos配置读取失败,请检查配置中心连接是否正确!");
}
http
......
......@@ -35,8 +35,8 @@ public class ResponseUtils {
break;
}
response.getHeaders().set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
response.getHeaders().set("Access-Control-Allow-Origin", "*");
response.getHeaders().set("Cache-Control", "no-cache");
response.getHeaders().set(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "*");
response.getHeaders().set(HttpHeaders.CACHE_CONTROL, "no-cache");
String body = JSONUtil.toJsonStr(Result.failed(resultCode));
DataBuffer buffer = response.bufferFactory().wrap(body.getBytes(StandardCharsets.UTF_8));
return response.writeWith(Mono.just(buffer))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册