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
commit e07e420637
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)
}