From ffac0c8f6588a746961a937f90b456f95098735e Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Sat, 14 Nov 2015 12:06:25 +0100 Subject: [PATCH] script to set CORS settings on your ipfs daemon --- ipfs_daemon_set_cors.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 ipfs_daemon_set_cors.sh diff --git a/ipfs_daemon_set_cors.sh b/ipfs_daemon_set_cors.sh new file mode 100755 index 0000000..03ebf24 --- /dev/null +++ b/ipfs_daemon_set_cors.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +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"]'