fix(stats): align deep route metadata with /data (#31930)

This commit is contained in:
Adam
2026-06-11 12:47:45 -05:00
committed by GitHub
parent 84f94e6143
commit e07e420637
4 changed files with 32 additions and 11 deletions

View File

@@ -10,7 +10,11 @@ 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(`${dataPath}/_build/`) || targetUrl.pathname === `${dataPath}/banner.jpg`) {
if (
targetUrl.pathname.startsWith(`${dataPath}/_build/`) ||
targetUrl.pathname === `${dataPath}/banner.jpg` ||
targetUrl.pathname === `${dataPath}/banner.png`
) {
targetUrl.pathname = targetUrl.pathname.slice(dataPath.length)
}