Skip to content
This repository was archived by the owner on Mar 25, 2022. It is now read-only.

gateway: set X-Ipfs-Gateway-Prefix header #116

Merged
1 commit merged into from
Nov 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,21 @@ server {
location /refs/ {
rewrite "^/refs(/.*)$" $1 break;
proxy_set_header Host refs.ipfs.io;
proxy_set_header X-Ipfs-Gateway-Prefix /refs;
proxy_pass http://gateway;
proxy_read_timeout 1800s;
}

location ~ "^/(ipfs|ipns|api)(/|$)" {
proxy_set_header Host "";
proxy_set_header X-Ipfs-Gateway-Prefix "";
proxy_pass http://gateway;
proxy_read_timeout 1800s;
}

location / {
proxy_set_header Host $host;
proxy_set_header X-Ipfs-Gateway-Prefix "";
proxy_pass http://gateway;
proxy_read_timeout 1800s;
}
Expand Down