1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-21 17:08:13 +08:00

42 Commits

Author SHA1 Message Date
fe8846fcd7 gx: mass update
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-24 15:58:44 -08:00
a784589d2a don't set origins twice
...

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-23 23:36:51 -08:00
20a044e383 fix a race and a potential race in http options
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-23 23:36:47 -08:00
418bb65d9d fix doc comment on CommandsROOption
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-23 20:27:15 -08:00
31bb782e77 fix code-climate issues
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-23 20:04:45 -08:00
176d15656d update go-ipfs-cmds, fix context closing issue
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2018-01-21 11:11:47 -08:00
0bdc2574ce update go-ipfs-cmds
Fix a nil pointer exception when no timeout is set and an HTTP request fails.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-21 11:11:47 -08:00
652ac620b1 golint: documentation fixes
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-21 11:11:47 -08:00
9080a588d8 golint: fix variable name
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-21 11:11:47 -08:00
bf804cca66 update to final cmds1.0
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2018-01-21 11:11:47 -08:00
267c19ab9d some fixes for latest from go-ipfs-cmds
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2018-01-21 11:11:47 -08:00
d93c0b6a4b Revert "use *oldcmds.Context consistently instead of non-ptr"
This reverts commit 852adb1c4a42a254286ac26b3bae7ea3a7bb69df.

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
aec44bc430 use *oldcmds.Context consistently instead of non-ptr
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
091eeee243 update go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
1cc7e2a28e update go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
7b1963906b update go-ipfs-cmds yet again
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
b23c3295e6 update go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
94266bf2e4 update go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
52bc298230 fix ServerNameOption
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
fbc36b8962 update dependencies and update TODO
broken sharness test t0110 has been fixed in master

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
7d57def06e remove dead code, update TODO
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
e8ad094448 add TODO
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
84101c8a2a go test passes, sharness fails
pass API path to cmds, fix options in add.

License: MIT
Signed-off-by: keks <keks@cryptoscope.com>
2018-01-21 11:11:47 -08:00
c1d6230bc0 check api version in corehttp
- add comments, trim api path prefix
- corehttp: add option to set HTTP header "Server"
- daemon: use new corehttp options

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
bd9576fa57 start adopting cmds3.0 - lots of errors!
- move go-ipfs-cmds/legacy to go-ipfs/commands/legacy
- update cmds,cmdkit; go test ./... ok

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
dfe7ef4fcf gx: update go-multihash
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 13:09:51 -08:00
8e5fbe9aa1 update go-ipfs-cmds to 0.4.11
to include @frist's uuid logging

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-22 19:06:00 +01:00
76e1da02a8 gx: massive update
Note: This commit is technically broken. However, I need to make a bunch of
cmds changes to make this work and I'd rather not bundle both changes into a
single commit.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-20 22:20:27 -08:00
d95a87cf57 update to go-ipfs-cmds 0.4.9
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:42 +01:00
0d9d21875c compatible to js-ipfs-api
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:42 +01:00
f287524949 cmd: use go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:41 +01:00
4555085844 fix races in http cors
License: MIT
Signed-off-by: Artem Andreenko <mio@volmy.com>
2015-10-13 01:09:55 +03:00
ab0c668ab8 fix panic caused by accessing config after repo closed
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 09:28:36 -07:00
rht
dd99a70a7d Add readonly api to gateway
Based on https://github.com/ipfs/go-ipfs/pull/1389

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-15 17:08:59 +07:00
3ee83a7c5e fix cors: defaults should take the port of the listener
need to do it this way to avoid VERY confusing situations where
the user would change the API port (to another port, or maybe even
to :0). this way things dont break on the user, and by default,
users only need to change the API address and things should still
"just work"

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
3f1cbe2f43 corehttp: add net.Listener to ServeOption
ServeOptions take the node and muxer, they should get the listener
too as sometimes they need to operate on the listener address.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
d5f94be474 fix API handler to respect referer + exit on CORS
this commit makes the API handler short circuit the request if the
CORS headers say its not allowed. (the CORS handler only sets the
headers, but does not short-circuit)

It also makes the handler respect the referer again. See security
discussion at https://github.com/ipfs/go-ipfs/issues/1532

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:08:11 -07:00
4a571b099b implement arbitrary HTTP header support
this commit adds the ability to specify arbitrary HTTP headers
for either the Gateway or the API. simply set the desired headers
on the config:

    ipfs config --json API.HTTPHeaders.X-MyHdr '["meow :)"]'
    ipfs config --json Gateway.HTTPHeaders.X-MyHdr '["meow :)"]'

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:08:10 -07:00
7cf5e87cfe Added API + Gateway support for arbitrary HTTP headers
This commit fixes + improves CORS support

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:08:09 -07:00
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
fbd76ebb5b corehttp: ServeOption supports chaining muxes
Each option now additionally returns the mux to be used by future options. If
every options returns the mux it was passed, the current behavior is unchanged.

However, if the option returns an a new mux, it can mediate requests to handlers
provided by future options:

    return func(n *core.IpfsNode, mux *http.ServeMux) (*http.ServeMux, error) {
      childMux := http.NewServeMux()
      mux.Handle("/", handlerThatDelegatesToChildMux)
      return childMux, nil
    }

License: MIT
Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
2015-02-08 11:27:06 -08:00
fadede6cb2 separate concerns 2015-01-22 01:28:40 -08:00