kubo/core/coreapi
Lucas Molas 25cc85fa93
feat(gateway): Gateway.FastDirIndexThreshold (#8853)
* fix(core/gateway): option to limit directory size listing

* feat(gw): HTMLDirListingLimit

This is alternative take on the way we limit the HTML listing output.
Instead of a hard cut-off, we list up to HTMLDirListingLimit.
When a directory has more items than HTMLDirListingLimit we show
additional header and footer informing user that only $HTMLDirListingLimit
items are listed. This is a better UX.

* fix: 0 disables Gateway.HTMLDirListingLimit

* refactor: Gateway.FastDirIndexThreshold

see explainer in docs/config.md

* refactor: prealoc slices

* docs: Gateway.FastDirIndexThreshold

* refactor: core/corehttp/gateway_handler.go

https://github.com/ipfs/go-ipfs/pull/8853#discussion_r851437088

* docs: apply suggestions from code review

Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2022-04-28 19:36:57 +02:00
..
test feat: opt-in Swarm.ResourceMgr (go-libp2p v0.18) (#8680) 2022-04-07 21:06:35 -04:00
block.go fix(cmds): CIDv1 and correct multicodecs in 'block put' and 'cid codecs' (#8568) 2022-04-21 18:19:40 +02:00
coreapi.go IPLD Prime In IPFS: Target Merge Branch (#7976) 2021-08-17 13:32:49 -04:00
dag.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
dht.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
key.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
name.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
object.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
path.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
pin.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
pubsub.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
swarm.go feat: add basic gateway tracing (#8595) 2022-04-04 19:24:05 +02:00
unixfs.go feat(gateway): Gateway.FastDirIndexThreshold (#8853) 2022-04-28 19:36:57 +02:00