Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix extra `/` in sitemap

Jakub Novakcbb646f2c4fb
diff --git a/apps/reverse-proxy/utils/replaceUrls.ts b/apps/reverse-proxy/utils/replaceUrls.ts
index d9a11250b..c079fe3a2 100644
--- a/apps/reverse-proxy/utils/replaceUrls.ts
+++ b/apps/reverse-proxy/utils/replaceUrls.ts
@@ -1,5 +1,5 @@
export function replaceUrls(text: string, urlPathName: string, prefix: string = '', lastChar: string = ''): string {
- const pattern = lastChar ? `(?<url>${prefix}https://e2b-[^${lastChar}]*)/${lastChar}$` : `(?<url>${prefix}https://e2b-.*)/?\b`
+ const pattern = lastChar ? `(?<url>${prefix}https://e2b-[^${lastChar}]*)/${lastChar}$` : `(?<url>${prefix}https://e2b-.*)/$`
return text.replaceAll(
new RegExp(pattern, 'g'),