Skip to content

Commit caeb772

Browse files
authored
Merge pull request #475 from thefrontside/fix-proxy-og-image-rewrite
Fix og:image URL rewriting in proxy route
2 parents 1e4a578 + 32abe0a commit caeb772

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

routes/proxy-route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function proxyRoute(options: ProxyRouteOptions): HTTPMiddleware {
101101
posixNormalize(`${base.pathname}${url}`),
102102
);
103103
} else if (properties.content.startsWith("http")) {
104-
properties.content = properties.content.replace(target.href, base.href.replace(/\/?$/,'/'));
104+
properties.content = properties.content.replace(target.origin, base.href.replace(/\/?$/, ''));
105105
}
106106
}
107107
}

0 commit comments

Comments
 (0)