install ipfs with full API.HTTPHeaders.Access-Control

This commit is contained in:
fred 2022-04-22 13:03:38 +02:00
parent e336648c31
commit c499d93c29
1 changed files with 5 additions and 5 deletions

View File

@ -25,12 +25,11 @@ err() {
if [[ $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) ]]; then
ipfs id && echo "ipfs swarm peers: " && ipfs swarm peers
echo "ipfs bootstrap list: " && ipfs bootstrap list
echo "ipfs daemon already running...! Must STOP ipfs AND remove ~/.ipfs to install again !!"
echo "Please RUN : sudo service ipfs stop"
exit 1
echo "ipfs daemon already running...!"
exit 0
fi
[[ -d ~/.ipfs ]] && echo "IPFS install exist! Please remove or backup before executing this script" && exit 1
[[ -d ~/.ipfs ]] && echo "IPFS install exist! Please remove or backup before executing this script" && exit 0
echo -e "Astroport IPFS Layer installation..."
@ -128,7 +127,8 @@ ipfs config --json Swarm.ConnMgr.LowWater 0
ipfs config --json Swarm.ConnMgr.HighWater 0
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'######### CLEAN DEFAULT BOOTSTRAP TO STAY INVISIBLE ###########
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
######### CLEAN DEFAULT BOOTSTRAP TO STAY INVISIBLE ###########
ipfs bootstrap rm --all
###########################################
# BOOTSTRAP NODES ARE ADDED LATER