Skip to content

Removing support for X-Ipfs-Gateway-Prefix #7702

@lidel

Description

@lidel

Is X-Ipfs-Gateway-Prefix useful to anyone?

Probably not(?)

I searched gh projects and when this header is mentioned it is set to empty string "just in case" (or a repo is a fork of go-ipfs).

Looks like an old, long time dead feature, and that is for a reason: it was introduced in 2016 (#1971) and AFAIK the only use for it was displaying blog under ipfs.io/blog, which we stopped doing in 2018 (ipfs-inactive/blog#182).

Why we stopped using it?

Since 2016 we realized nesting multiple gateway types under single Origin on the web is too complex and brittle.
IPFS community moved towards dedicated Origins, which are much easier to isolate and reason about (we moved ipfs.io/blog to subdomain at blog.ipfs.io) and the need for X-Ipfs-Gateway-Prefix went away.

Proposal: remove support for X-Ipfs-Gateway-Prefix

Existence of this header makes gateway code harder to maintain, and suggests risky deployment decisions. Right now the header is already ignored in various places, but nobody seems to care to fill a bug report ;-)

Instead of fixing it I'd like to remove it from docs/config.md and gateway code to decrease complexity, avoid origin-related bugs in the future, and make it more clear that one should mount only one DNSLink per Origin.

If someone is still depending on this header, please comment below describing your use case.
A better way most likely exists.

"But I AM using it!"

If you are using it, please comment below and describe your use case.
Most likely there is a better/safer way to serve your use case these days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: Not priority right nowkind/maintenanceWork required to avoid breaking changes or harm to project's status quoneed/community-inputNeeds input from the wider communityneed/triageNeeds initial labeling and prioritizationtopic/gatewayTopic gateway

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions