@cryptotaxi247 / kubo / commits / c4fb36b8c

daemon help docs for CORS

Convey the basic idea, plus an example. Don't encourage using `*`. This would have saved me some code spelunking.

Jason Carver committed Jul 2, 2015 at 18:06 UTC c4fb36b8c8ee23fc75d56f229253bca316020ee3
1 file changed +7 -1
cmd/ipfs/daemon.go
+7 -1
@@ -68,7 +68,13 @@ in the network, use 0.0.0.0 as the ip address:
68
69 Be careful if you expose the API. It is a security risk, as anyone could control
70 your node remotely. If you need to control the node remotely, make sure to protect
71 -the port as you would other services or database (firewall, authenticated proxy, etc).`,
71 +the port as you would other services or database (firewall, authenticated proxy, etc).
72 +
73 +In order to explicitly allow Cross-Origin requests, export the root url as
74 +environment variable API_ORIGIN. For example, to allow a local server at port 8888,
75 +run this then restart the daemon:
76 +
77 + export API_ORIGIN="http://localhost:8888/`,
78 },
79
80 Options: []cmds.Option{