Move the CORS headers from IPFS to the nginx reverse proxy

This commit is contained in:
Greg Karékinian 2017-03-20 22:49:06 +00:00
parent 114503033b
commit f7de7e215a
2 changed files with 2 additions and 5 deletions

View File

@ -16,11 +16,6 @@ ipfs_config "Addresses.Gateway" do
value "/ip4/127.0.0.1/tcp/9090"
end
# Set up CORS headers
ipfs_config "API.HTTPHeaders.Access-Control-Allow-Origin" do
value ["kredits.kosmos.org"]
end
# Set up the Gateway to be writable
ipfs_config "Gateway.Writable" do
value true

View File

@ -31,6 +31,8 @@ server {
# Increase number of buffers. Default is 8
proxy_buffers 1024 8k;
proxy_http_version 1.1;
# CORS headers for Kredits
add_header 'Access-Control-Allow-Origin' 'https://kredits.kosmos.org';
location /api/v0/cat {
proxy_pass http://_ipfs/api/v0/cat;