Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix replaceUrls
Jakub Novak64b9c2a4a09c
diff --git a/apps/reverse-proxy/utils/replaceUrls.ts b/apps/reverse-proxy/utils/replaceUrls.tsindex f65a7efbe..4eeecfe8c 100644--- a/apps/reverse-proxy/utils/replaceUrls.ts+++ b/apps/reverse-proxy/utils/replaceUrls.ts@@ -1,9 +1,9 @@export function replaceUrls(text: string, urlPathName: string, prefix?: string, lastChar: string = ''): string {- const pattern = lastChar ? `${prefix}https://e2b-[^${lastChar}]*${lastChar}` : `${prefix}https://e2b-.*[^/]$`+ const pattern = lastChar ? `(?<url>${prefix}https://e2b-[^${lastChar}]*)/${lastChar}` : `(?<url>${prefix}https://e2b-.*)/`return text.replaceAll(new RegExp(pattern, 'g'),- match => match.replace(new RegExp(`/${lastChar}$`), lastChar),+ (_, url) => url + lastChar,).replaceAll(`${prefix}https://e2b-landing-page.framer.website`,