提交修改

This commit is contained in:
quyixiao 2025-03-30 17:17:00 +08:00
parent 8194346179
commit 8cc4f7d4a7
3 changed files with 9 additions and 25 deletions

View File

@ -88,14 +88,15 @@ public class AuthWebFilter implements WebFilter {
String realIpAddress = getRealIpAddress(request);
String m = request.getMethod().toString();
log.info("AuthWebFilter api start time:{} ip:{} method:{} url:{},uri:{} param:{} headers:{}",
log.info("AuthWebFilter api start time:{} ip:{} method:{} url:{},uri:{} param:{} headers:{},xForwardedPath:{}",
startTime,
realIpAddress,
m,
request.getPath(),
uri,
request.getQueryParams(),
httpHeaders
httpHeaders,
xForwardedPath
);
if(xssProperties.getEnabled()) {
@ -196,8 +197,8 @@ public class AuthWebFilter implements WebFilter {
ServerHttpRequest request = exchange.getRequest();
if (StringUtils.isNotEmpty(xForwardedPath)) {
String originXForwardedPath = xForwardedPath;
if (xForwardedPath.contains(ApiConstants.API_USER)) {
xForwardedPath = "/" + ApiConstants.API_USER + xForwardedPath.split(ApiConstants.API_USER)[1];
if (xForwardedPath.contains(ApiConstants.API_INTERFACE)) {
xForwardedPath = "/" + ApiConstants.API_INTERFACE + xForwardedPath.split(ApiConstants.API_INTERFACE)[1];
}
log.info("getRequest xForwardedPath is not null originXForwardedPath:{},xForwardedPath:{}",originXForwardedPath, xForwardedPath);
request = request.mutate().path(xForwardedPath).build();

View File

@ -86,7 +86,7 @@ public class ApiConstants {
public static final String ECHOBACK = "echoback";
public static final String X_FORWARDED_PATH = "X-Forwarded-Path";
public static final String API_USER = "api-user";
public static final String API_INTERFACE = "api-interface";
}

View File

@ -24,11 +24,11 @@ public class R<T> {
private String msg;
// 联系方式
private String contactUs = "如果接口有疑问请加微信 fmai0923,shell_quyixiao,wulinq,或 致电18969093321,或发邮" +
"件service@ihzhy.com,如需咨询技术问题请提供traceId";
//private String contactUs = "如果接口有疑问请加微信 fmai0923,shell_quyixiao,wulinq,或 致电18969093321,或发邮" +
// "件service@ihzhy.com,如需咨询技术问题请提供traceId";
// 官网地址
private String officialWebsiteAddress = "https://www.ihzhy.com";
// private String officialWebsiteAddress = "https://www.ihzhy.com";
/**
* 日志编号
@ -148,22 +148,5 @@ public class R<T> {
this.traceId = traceId;
}
public String getContactUs() {
return contactUs;
}
public void setContactUs(String contactUs) {
this.contactUs = contactUs;
}
public String getOfficialWebsiteAddress() {
return officialWebsiteAddress;
}
public void setOfficialWebsiteAddress(String officialWebsiteAddress) {
this.officialWebsiteAddress = officialWebsiteAddress;
}
}