-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
set $proxyhost $host; | ||
location /refs/ { | ||
rewrite "^/refs/([^/]+)/([^/]+)/([^/]+)$" "/" break; | ||
proxy_set_header Host $3.$2.$1.refs.ipfs.io; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't seem robust enough to also handle:
refs.ipfs.io
a.refs.ipfs.io
b.a.refs.ipfs.io
maybe we should just have one ipfs graph, with its root at refs.ipfs.io
, redirect /refs/...
to refs.ipfs.io
, and it could handle $refs/a/b/c
.
@lgierth am good to ship this if you dont have much time, but think we probably should leverage ipfs graphs to have a root at |
Ooh yep that's a lot simpler -- we'll just have one |
Rewrites requests for /refs/* to refs.ipfs.io/*. Also replaces conditionals with location directives, which are evaluated more efficiently. License: MIT Signed-off-by: Lars Gierth <[email protected]>
That's what it does now -- see https://ipfs.io/refs. We'll have to fix the gateway's directory listings once more :/ |
Rewrites requests for
/refs/a/b/c
toc.b.a.refs.ipfs.io
.Also replaces conditionals with location directives,
which are evaluated more efficiently.
Part of the gateway-dmca-denylist thing: ipfs/kubo#1551 https://github.com/ipfs/gateway-dmca-denylist