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

Commit

Permalink
Merge pull request #116 from ipfs/ipfs-prefix
Browse files Browse the repository at this point in the history
gateway: set X-Ipfs-Gateway-Prefix header
  • Loading branch information
Lars Gierth committed Nov 21, 2015
2 parents a1ef233 + 829e1a7 commit c948ff1
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit c948ff1

Please sign in to comment.