I’m trying to set up a subdomain IPFS gateway with Kubo. Everything runs behind a Caddy reverse proxy. The problem is that every CID, despite resolving via ipfs.v1rtl.site/ipfs/<cid> and being pinned, it returns 404.
$ curl https://bafybeieenkchlv6s5zaxr2tjnuxtufihlmpfo4u2xp5hf4a4lsxsizuo5q.ipfs.v1rtl.site
404 page not found
Hm… I think the Kubo config has redundant ipfs..
Subdomain mode implies {cid}.ipfs. and {id}.ipns. will be used anyway, as a way of accessing every enabled namespace.
So for config with expliciut ipfs.v1rtl.site, the subdomain URL would have .ipfs.ipfs: https://bafybeieenkchlv6s5zaxr2tjnuxtufihlmpfo4u2xp5hf4a4lsxsizuo5q.ipfs.ipfs.v1rtl.site/ whichis likely not what you want.
To fix it, and only have one .ipfs. subdomain, try updating Kubo config to not have ipfs.:
- "ipfs.v1rtl.site": {
+ "v1rtl.site": {
Then Kubo’s handling of Host header when processing https://bafybeieenkchlv6s5zaxr2tjnuxtufihlmpfo4u2xp5hf4a4lsxsizuo5q.ipfs.v1rtl.site/ will work as expected.