fix(stats): serve stats og image from banner

This commit is contained in:
Adam 2026-06-03 10:53:07 -05:00
commit d08fedaccc
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
5 changed files with 14 additions and 7 deletions

View file

@ -8,7 +8,7 @@ export async function statsProxy(evt: APIEvent) {
targetUrl.hostname = Resource.App.stage === "production" ? "stats.opencode.ai" : "stats.dev.opencode.ai"
targetUrl.port = ""
if (targetUrl.pathname.startsWith("/stats/_build/")) {
if (targetUrl.pathname.startsWith("/stats/_build/") || targetUrl.pathname === "/stats/banner.png") {
targetUrl.pathname = targetUrl.pathname.slice("/stats".length)
}