1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00
ipfs-boards/ipfs_daemon_set_cors.sh

14 lines
602 B
Bash
Raw Normal View History

#!/bin/bash
2015-11-15 21:35:50 +01:00
# This will make sure your ipfs node works with the app.
2015-11-15 22:44:12 +01:00
# NOTE: this change is PERMANENT until reversed!
2015-11-18 17:03:52 +01:00
# If you want a temporary solution, try running your daemon like this:
# API_ORIGIN="localhost:8080" ipfs daemon
# replace localhost:8080 with whatever domain:port you're connecting from :)
# Also see https://github.com/ipfs/js-ipfs-api#cors
2015-11-15 21:35:50 +01:00
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"]'