Skip to content

Fix tool assets without trailing slashes - #21

Open
EdgeClaws wants to merge 1 commit into
mainfrom
clawdia/tool-absolute-assets
Open

EdgeClaws wants to merge 1 commit into
mainfrom
clawdia/tool-absolute-assets

Conversation

@EdgeClaws

Copy link
Copy Markdown
Collaborator

Summary

  • rewrite each public tool page's own ./ stylesheet and script references to root-absolute /tool/... URLs during the build
  • preserve the existing asset-version query strings and shared ../assets/ paths
  • add generated-output coverage for every public tool's local assets

Why

DigitalOcean currently serves /tool with 200 instead of redirecting to /tool/. Browser-relative ./file references therefore resolve at the site root and 404. Root-absolute tool asset paths work for both URL forms without adding a Cloudflare-only routing dependency or conflicting with Balance History's base-uri 'none' CSP.

Verification

  • npm run check
  • 81/81 tests
  • 16 generated pages and 6 external destinations checked
  • all three Worker dry-runs passed
  • gitleaks passed
  • browser matrix passed for /balance, /fio, /token, /status, /orders with and without trailing slashes
  • all ten cases loaded their intended styles and scripts with zero local 4xx responses, console errors, or page errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant