refactor: ignore /api path cache

This commit is contained in:
Tristan Yang
2023-04-11 09:37:12 +08:00
parent 70d53c46ee
commit b700a24011
+2 -2
View File
@@ -33,8 +33,8 @@ registerRoute(
return false;
} // If this is a URL that starts with /_, skip.
const urlPath = url.pathname;
// 忽略swagger文档 本地语言文件 挂件地址
if (urlPath.startsWith("/api/swagger") || urlPath.startsWith("/locales/") || urlPath.startsWith("/widget")) {
// 忽略api开头的path 本地语言文件 挂件地址
if (urlPath.startsWith("/api") || urlPath.startsWith("/locales/") || urlPath.startsWith("/widget")) {
return false;
}
if (urlPath.startsWith("/_")) {