fix(frontend): dex.cl8y.com robots.txt and sitemap.xml must not be the SPA shell #1212
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#1212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
https://dex.cl8y.com/robots.txtand/sitemap.xmlmust be real crawl files, not the Vite SPA shell.Live 2026-09-13: both URLs return 200
text/html,cache-control: no-cache, must-revalidate, same etag as/(6aa507fa-e06), body starts<!doctype html>. Root cause: files are missing fromfrontend-dapp/public/, anddocker/frontend/nginx.conflocation /usestry_files $uri $uri/ /index.html. The og-image exception already shows the correct pattern (location = /og-image.png→try_files $uri =404).This issue bundles robots + sitemap + exact-location 404. Do not split. Do not invent unique per-route SEO titles for the SPA.
Closed marketing tracker: cl8y-marketing#2. Do not reopen it for DEX nginx work.
Given / When / Then
Given Coolify serves
dex.cl8y.comfromdocker/frontendnginx + VitedistWhen a crawler fetches
/robots.txtand/sitemap.xmlThen the responses are
text/plainrobots syntax andapplication/xmlurlset(not SPA HTML)And if those files are missing after a bad deploy, nginx returns 404, not HTML 200
And
/og-image.pngand hashed JS/CSS miss behavior stay unchanged (#578 / #706)Not a duplicate / already implemented
@hashed_asset_miss). Complementary; do not weaken.Not implemented: no
robots.txt/sitemap.xmlunderfrontend-dapp/public/. nginx has nolocation = /robots.txt//sitemap.xml.index.htmlhas norobots/noindexmeta. Confirmed live HTML shell 2026-09-13.Current codebase
Coolify →
docker/frontend/Dockerfile: Nodenpm run build, runtimenginx:alpine,COPY nginx.conf+dist.Vite copies
frontend-dapp/public/to the dist root. nginx:.txtand.xmlare not in the hashed-asset regex, so missing robots/sitemap hit SPA fallback.index.htmlis one OG/title shell for every route (OG-5: no prerender, no per-route titles).frontend-dapp/public/today: favicons, bootstrap, wallets, chainlist,og-image.png, sounds — no robots/sitemap.If files were added to
public/only,try_files $uriwould serve them while present. Default nginx mime:.txt→text/plain(good);.xml→text/xml(acceptance wantsapplication/xml). If the files go missing later, SPA fallback returns HTML 200 again. Exactlocation =+=404is required.Why the new implementation is needed
Crawlers that fetch
/robots.txtand/sitemap.xmlreceive the DEX SPA HTML. Search Console can treat that as a soft-404 / HTML robots file. Adding files without exact-location nginx will regress the first time a deploy omits them.The DEX SPA must not become the SEO content host. This ticket only makes crawl endpoints honest and keeps wallet/manage/mint/unbounded pair routes noindex or omitted. Unique canonicals belong on a future static/prerender host (
docs.cl8y.comis currently not an implementable surface).Constraints / guardrails
Disallowa future content host (docs.cl8y.com/cl8y.comcontent)./portfolio,/trader/:address,/token/:addr/manage,/mint, unbounded pair URLs).@hashed_asset_miss). Do not widen SPA fallback..xml→text/xml; setdefault_type application/xml(or equivalent) for/sitemap.xml.Sitemap:in robots may point at a content host only after that host has a real sitemap; until then use a minimal DEX sitemap or omit the Sitemap line.FeeSource, PostHog,cl8y.comrobots (follow-on), prerender/react-helmet.Relevant files
docker/frontend/nginx.confdocker/frontend/Dockerfilefrontend-dapp/public/robots.txt+sitemap.xmlfrontend-dapp/index.htmlX-Robots-Tagis nginx, not helmetfrontend-dapp/src/App.tsxscripts/qa/verify-issue-578.shskills/AGENTS_FRONTEND_OPENGRAPH.mddocs/frontend.mdRecommended direction
frontend-dapp/public/robots.txt(User-agentsyntax,text/plain). Conservative: do notAllowunbounded/trader/or/token/*/manage.frontend-dapp/public/sitemap.xml— minimalurlsetof first-party DEX URLs that are intentionally crawlable (likely none or only/if the SPA should stay noindex). Omit wallet, manage, mint, and infinite pair/trader paths. Hosts in the urlset arehttps://dex.cl8y.comonly.X-Robots-Tag: noindex, nofollowonlocation = /index.htmlso crawlers skip the transaction UI even if they ignore an empty sitemap./sitemap_index.xml,/robots.txt/trailing slash) are 404 or real files — not SPA HTML 200.make verify-issue-1212: grep exact locations; local nginx container curl type + body sniff; negative test with files renamed → 404.Reject: relying on
Disallowas a security control; listing attacker-controlled hosts in the sitemap; helmet/prerender in this ticket.Acceptance criteria
GET https://dex.cl8y.com/robots.txt→text/plain, body is robots syntax (User-agent), not<!doctype/ Vite SPA.GET https://dex.cl8y.com/sitemap.xml→application/xml(or+xml), body is an XMLurlset(empty valid urlset OK), not SPA HTML./portfolio,/trader/:address,/token/:addr/manage,/mint, unbounded pair URLs)./og-image.pngstillimage/png; hashed JS/CSS misses still 404 (#578 / #706).Test plan (functional paths)
text/plain+User-agent; sitemapapplication/xml+<urlsetindex.html/,/trade,/portfolio/sitemap_index.xml,/robots.txt.bak/og-image.png+ hashed asset missmake verify-issue-578/#706X-Robots-Tagon HTMLPlaywright not required. Vitest not required unless a static-file unit test is added.
Test plan (attack, hack, and abuse)
https://dex.cl8y.comURLs/trader/:addr,/token/.../manage,/mintAllowthose wildcardsDisallowto hide secretsAllow:of dynamic segmentsSitemap:pointing at a foreign hostjavascript:in urlsetVerification criteria
make verify-issue-1212(grep nginx exact locations + local container curl type/body + negative 404).make verify-issue-578andmake verify-issue-706still green.nginx.confshows exact locations without changing hashed-asset 404 or og-image.-sIand body checks onhttps://dex.cl8y.com/robots.txtand/sitemap.xmlvs the 2026-09-13 HTML-shell baseline.docs/frontend.mdnotes that crawl endpoints are real files; unique canonicals remain blocked on the missing content host.fix: dex.cl8y.com robots.txt and sitemap.xml must not be the SPA shellto fix(frontend): dex.cl8y.com robots.txt and sitemap.xml must not be the SPA shellRepair: DEX-native DoR. Live 2026-09-13 still SPA HTML 200 on /robots.txt and /sitemap.xml. Robots+sitemap+exact-location 404 stay one ticket. Not a dupe of #578/#706.
Occupying-runner check: implement labels already present; no extra labels added.
/agent implement
/agent implement
/agent implement
/agent implement
/agent implement
Verification (2026-09-24): not closable.
/robots.txt,/sitemap.xml,/sitemap_index.xml,/robots.txt.bak, and/robots.txt/return 200text/htmlwith the same SPA body/ETag. This fails AC1–3 and T4.frontend-dapp/public/has neither crawler file; nginx has no exact file-only locations;make verify-issue-1212is absent./og-image.pngisimage/pngand missing hashed JS/CSS return 404;/tradestill serves the SPA.Remaining:
No newer successor issue found via fj searches for robots, sitemap, or crawl. Preserve [#578] and [#706].