Move CORS headers from nginx to ipfs
This commit is contained in:
parent
e5f3121ee3
commit
f96444d6f4
|
@ -21,4 +21,15 @@ ipfs_config "Gateway.Writable" do
|
|||
value true
|
||||
end
|
||||
|
||||
# Set up CORS headers
|
||||
ipfs_config "API.HTTPHeaders.Access-Control-Allow-Credentials" do
|
||||
value '["true"]'
|
||||
end
|
||||
ipfs_config "API.HTTPHeaders.Access-Control-Allow-Methods" do
|
||||
value '["PUT", "GET", "POST"]'
|
||||
end
|
||||
ipfs_config "API.HTTPHeaders.Access-Control-Allow-Origin" do
|
||||
value '["*"]'
|
||||
end
|
||||
|
||||
include_recipe "kosmos-ipfs::letsencrypt"
|
||||
|
|
|
@ -31,10 +31,6 @@ 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' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET,POST,PUT';
|
||||
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||
|
||||
location /api/v0/cat {
|
||||
proxy_pass http://_ipfs/api/v0/cat;
|
||||
|
|
Loading…
Reference in New Issue