I have been resolving issues related to IPFS access and it seems the design is that 127.0.0.1 is used for local updates with an API interface to a app. I have 5001 access issues and I have checked already IPFS CORS.
Here is the error -
POST http://jenbil.com:5001/api/v0/cat?arg=QmU5KhkgvweYgE3Gsr8A19uFQrq7mszx7dubcoo89cTmAV&stream-channels=true net::ERR_CONNECTION_REFUSED
I have this config -
{
"API": {
"HTTPHeaders": {
"Access-Control-Allow-Credentials": [
"true"
],
"Access-Control-Allow-Methods": [
"PUT",
"POST",
"GET"
],
"Access-Control-Allow-Origin": [
"*"
]
}
},
"Addresses": {
"API": "/ip4/127.0.0.1/tcp/5001",
"Gateway": "/ip4/127.0.0.1/tcp/8180",
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001"
]
},
"Bootstrap": [
"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/ip6/2604:a880:1:20::1d9:6001/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx"
],
"Datastore": {
"BloomFilterSize": 0,
"GCPeriod": "1h",
"HashOnRead": false,
"NoSync": false,
"Params": null,
"Path": "/root/.ipfs/datastore",
"StorageGCWatermark": 90,
"StorageMax": "10GB",
"Type": "leveldb"
},
"Discovery": {
"MDNS": {
"Enabled": true,
"Interval": 10
}
},
"Experimental": {
"FilestoreEnabled": false,
"ShardingEnabled": false
},
"Gateway": {
"HTTPHeaders": {
"Access-Control-Allow-Headers": [
"X-Requested-With"
],
"Access-Control-Allow-Methods": [
"GET"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"PathPrefixes": [],
"RootRedirect": "",
"Writable": false
},
"Identity": {
"PeerID": "QmNwbtyFuEBDoB2BQGNe144jJXGJPJ9QrcwzNDMuqGYiZ9"
},
"Ipns": {
"RecordLifetime": "",
"RepublishPeriod": "",
"ResolveCacheSize": 128
},
"Mounts": {
"FuseAllowOther": false,
"IPFS": "/ipfs",
"IPNS": "/ipns"
},
"Reprovider": {
"Interval": "12h"
},
"SupernodeRouting": {
"Servers": null
},
"Swarm": {
"AddrFilters": null,
"DisableBandwidthMetrics": false,
"DisableNatPortMap": false
},
"Tour": {
"Last": ""
}
And the config file for Nginx
server {
listen 80 default_server;
listen 8080;
listen 5001;
listen 8180;
listen [::]:80 default_server ipv6only=on;
# root /usr/share/nginx/html/ipfs/src;
#
root /usr/share/nginx/html;
#root /var/www/html;
index index.html index.htm index.nginx-debian.html;
# index App.js index.html index.htm;
#listen 443 ssl;
server_name jenbil.com;
#server_name _;
#ssl on;
#ssl_certificate /home/keys/jenbil.com.chained.crt;
#ssl_certificate_key /home/keys/jenbil.key;
# Make site accessible from http://localhost/
###jenbil server_name localhost;
location / {