Move the CORS headers from IPFS to the nginx reverse proxy
This commit is contained in:
parent
114503033b
commit
f7de7e215a
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user