Skip to content

fake gateway: a directory under a site's /_decdn/ serves its index.html, and its redirect keeps the query #29

Closed

Description

@yigitdot

The gateway fix for decdn/decdn#2818 changes what a site origin answers under /_decdn/. The fake gateway still mirrors the old behavior.

Gateway behavior after the fix, for a bundle <h> with docs/index.html and no docs entry, on a site origin:

  • GET /_decdn/<h>/docs answers 302 Location: docs/. With a query, the redirect keeps it: GET /_decdn/<h>/docs?ns=7 answers 302 Location: docs/?ns=7.
  • GET /_decdn/<h>/docs/ (and …/docs/?ns=7) serves docs/index.html, as a site's own /docs/ does. Before the fix it answered 400.
  • HEAD /_decdn/<h>/docs/ redirects to docs/index.html on the bundle's site, at no pull.
  • A site's own-path redirect (/docs → docs/) is unchanged and carries no query.

To do:

  • Fix the fake's /_decdn/ directory handling: map a trailing / inside a bundle to …/index.html, and keep the request's query on the directory redirect.
  • Add a directory entry to the contract fixture bundle.
  • Add a contract test for the cases above, then move .github/sdk-typescript.sha in decdn/decdn to the commit that adds it.

Activity

  1. yigitdot commented on Nov 23, 2026

    @yigitdot
    ContributorAuthor

    decdn/decdn#2941 changed two details of the behavior described above:

    • A site's own-path directory redirect now keeps the query too: GET /docs?tab=2 answers 302 Location: docs/?tab=2 (HEAD alike). It no longer drops it.
    • A navigation (Sec-Fetch-Mode: navigate) or HEAD of /_decdn/<h>/docs/ redirects to the directory on the bundle's site, https://<site>/docs/, not to …/docs/index.html.
  2. added
    bug
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions