Commit 7ef8ea72 authored by jiaorz's avatar jiaorz

网关日志限制修改

parent 9f9e259a
......@@ -329,10 +329,16 @@ public class AccessGatewayFilter implements GlobalFilter {
if (null != method) {
log.info("=================请求方法:" + method.name());
}
request.getHeaders().add("uuid", UUID.randomUUID().toString());
// 记录头部信息
builder.append(", header { ");
for (Map.Entry<String, List<String>> entry : request.getHeaders().entrySet()) {
builder.append(entry.getKey()).append(":").append(StringUtils.join(entry.getValue(), ",")).append(",");
if("uuid".equals(entry.getKey())) {
if(entry.getValue() != null && entry.getValue().size() > 0) {
log.info("=================请求方法uuid:" + entry.getValue().get(0));
}
}
if("Authorization".equals(entry.getKey())) {
if(entry.getValue() != null && entry.getValue().size() > 0) {
getAdminUserInfo(entry.getValue().get(0));
......
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