release(main): 集成 nginx 移除里程碑
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
const trimTrailingSlashes = (value: string): string => value.replace(/\/+$/, "");
|
||||
|
||||
export const resolveApiBaseUrl = (rawValue: string | undefined): string => {
|
||||
const normalized = rawValue?.trim() ?? "";
|
||||
if (!normalized) {
|
||||
return "/";
|
||||
}
|
||||
if (normalized === "/") {
|
||||
return "/";
|
||||
}
|
||||
return trimTrailingSlashes(normalized);
|
||||
};
|
||||
Reference in New Issue
Block a user