fix(X-Pack): apisix添加动态路径后重启服务会被重置

This commit is contained in:
fit2cloud-chenyw 2024-08-30 16:42:18 +08:00
parent 0f4c1240a9
commit 3ac2d3319c
2 changed files with 12 additions and 1 deletions

@ -1 +1 @@
Subproject commit 7e46266484070b6c2e2825668a884089fa5b3ec2 Subproject commit 1c6bacf00aaa84ec09d4a0cceab08bba46a3b533

View File

@ -73,4 +73,15 @@ public class WhitelistUtils {
|| StringUtils.startsWithAny(requestURI, "/communicate/image/") || StringUtils.startsWithAny(requestURI, "/communicate/image/")
|| StringUtils.startsWithAny(requestURI, "/communicate/down/"); || StringUtils.startsWithAny(requestURI, "/communicate/down/");
} }
public static String getBaseApiUrl(String redirect_uri) {
if (StringUtils.endsWith(redirect_uri, "/")) {
redirect_uri = redirect_uri.substring(0, redirect_uri.length() - 1);
}
String contextPath = WhitelistUtils.getContextPath();
if (StringUtils.isNotBlank(contextPath)) {
redirect_uri += contextPath;
}
return redirect_uri + AuthConstant.DE_API_PREFIX + "/";
}
} }