1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 05:52:20 +08:00

931 Commits

Author SHA1 Message Date
3f6cca8a2f set identity on core mock to fix ipns tests
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 23:35:50 -07:00
8f35c3bcd9 more serious CORS tests.
this commit introduces more serious CORS tests that check
status response codes, and run real HTTP requests.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:08:11 -07: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
b32d0ef153 implement 'editor' abstraction
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 15:00:07 -07:00
7c510662ae break merkledag utils into its own package
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 15:00:07 -07:00
194eb7c0dc more tests and better path handling in object
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 15:00:07 -07:00
bfe4e4be4f let rm understand paths
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 15:00:07 -07:00
870df2431a allow patch to optionally create intermediate dirs
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 15:00:07 -07:00
f2b44e3338 rmeove duplicate timeout option from diag
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 08:17:42 -07:00
8fe7d2f571 Fix refs -r -u for #1211
License: MIT
Signed-off-by: Gaetan Voyer-Perrault <gatesvp@gmail.com>
2015-07-28 06:14:20 -07:00
f417cb5ceb Merge pull request #1510 from ipfs/pinfail-debug
print output on test failure for t0081
2015-07-27 18:41:31 -07:00
870d85080a Merge pull request #1516 from rht/progressbar
Clear progress bar on `ipfs cat` exit
2015-07-27 18:39:37 -07:00
138198e786 print output on test failure for t0081
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-27 18:34:37 -07:00
e3c35d8b76 cmds/get: fix context timeout problem
Get had a random timeout of 60s. This commit fixes that, wiring
up our contexts correctly.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-24 14:43:17 -07:00
rht
818d3af827 Clear progress bar on ipfs cat exit
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-24 23:04:57 +07:00
bb3a75aa08 remove context from context
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 20:53:06 -07:00
f9f3c6a527 make offline commands respect timeout
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 14:34:16 -07:00
6083007987 add a global timeout flag for to be setting timeouts
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 12:53:37 -07:00
78e9794be0 Add the missing long argument for ipfs mount
License: MIT
Signed-off-by: Michael Muré <batolettre@gmail.com>
2015-07-18 15:00:26 +02:00
a19ad97ea5 make ping its own protocol
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-13 19:19:25 -07:00
7077d71740 Merge pull request #1464 from ipfs/fix/filters-offline
error out swarm filter when no daemon is online
2015-07-10 18:12:25 -07:00
e8d825de25 error out swarm filter when no daemon is online
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-10 13:10:22 -07:00
6e9c72ab37 expose internal/pb packages.
we shouldn't use internal packages.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-10 11:08:49 -07:00
73d3fa5c1d Merge pull request #1460 from ipfs/hidden-split
Add hidden file support to add
2015-07-09 05:16:26 -07:00
e55a130b49 Add hidden file support to add
License: MIT
Signed-off-by: Gaetan Voyer-Perrault <gatesvp@gmail.com>
2015-07-09 04:07:34 -07:00
f6f9cae4e4 Merge pull request #1449 from ipfs/tk/file-ls-help-fixup
core/commands/unixfs/ls: Drop multi-column example from --help
2015-07-06 20:32:20 -07:00
6c092eb821 Merge pull request #1440 from rht/fix-cli
Assert and convert config value into predefined struct
2015-07-06 20:03:59 -07:00
b304eef2d3 core/commands/unixfs/ls: Drop multi-column example from --help
The old text belonged to an earlier iteration that didn't land in the
rebased 434871ba (core/commands/unixfs: Add 'ipfs unixfs ls ...',
2015-06-09).
2015-07-06 09:15:13 -07:00
rht
0ceac5ded9 Use WithContextAndTeardown whenever possible
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-05 09:19:06 +07:00
rht
007a12e7ef Change Process interface into object variable
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00
rht
330b213777 Replace ctxgroup.ContextGroup -> goprocess.Process
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00
rht
541836c4a3 Auto-assert setconfig value to predefined struct
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:29:10 +07:00
053e531dac http/index: fix indention and remove unused field
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-04 00:51:42 +02:00
0ed49dbbfb http/gateway:
- First tab at integrating @krl's new index page

File icons are embedded in side icons.css (QmXB7PLRWH6bCiwrGh2MrBBjNkLv3mY3JdYXCikYZSwLED contains both the icons and bootstrap)

- Fix back links (..)  (fixes #1365)

Thanks @JasonWoof for the insight.  The back links now stop a t the root hash and work for links that do and dont end with a slash.

License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-04 00:51:42 +02:00
8143d381c1 Merge pull request #1441 from rht/path-validate
Remove redundant path validation
2015-07-03 15:23:17 -07:00
rht
44245fe015 Add test to detect invalid path
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 02:50:15 +07:00
rht
dfde18e124 Add path validation in Resolver.ResolvePath
Add ErrNoComponents in ParsePath validation & remove redundant path
validation.
Any lines using core.Resolve & Resolver.ResolvePath will have their path
validated.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 02:41:28 +07:00
0d42a6a7bc Merge pull request #1433 from ipfs/fix/addr-filter
add filters from config to addr filter in swarm
2015-07-02 17:00:36 -07:00
c595cf8ae0 config: DialBlocklist -> Swarm.AddrFilters
This commit changes the DialBlocklist key to be under the key
Swarm.AddrFilters instead.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-02 16:11:46 -07:00
rht
3798178705 Don't use tar reader for '-C' only flag
Currently `ipfs get -C <hash>` returns error even if <hash> is a file.
This PR is for the case when the compress flag is enabled, use the
dagreader directly and pipe to a gzip processor.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-01 09:36:25 +07:00
7cc73f7b86 add command to manipulate address filters and a sharness test for them
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 18:25:34 -07:00
e7fd57f69a add filters from config to addr filter in swarm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 15:03:56 -07:00
ed8d3ae388 api: add /metrics endpoint for prometheus
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-06-29 23:15:15 +02:00
500f51300d ipfs swarm addrs local - show local addrs
Add a command to return local addresses.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:42 -07:00
c5caccba14 ipfs id -f=<addrs> and \n \t
- added <addrs> field to `ipfs id -f`
- added \n and \t conversion in `ipfs id -f`

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:42 -07:00
c9edbf359d Merge pull request #1403 from dylanPowers/object-new-templates
Object new templates
2015-06-26 04:23:26 -07:00
0332f3dbaa Merge pull request #1348 from ipfs/tk/unixfs-ls
Add 'ipfs file ls …'
2015-06-25 10:03:52 -07:00
aefdb4e0e1 Merge pull request #1417 from ipfs/feat/only-hash
add option to only hash input
2015-06-24 16:24:17 -07:00