Commit Graph

16 Commits

Author SHA1 Message Date
Marcin Rataj
edb7056747
feat(config): add Gateway.MaxRequestDuration option (#11138)
* feat(config): add Gateway.MaxRequestDuration option

exposes the previously hardcoded 1 hour gateway request deadline as a
configurable option, allowing operators to adjust it to fit deployment
needs. protects gateway from edge cases and slow client attacks.

boxo: https://github.com/ipfs/boxo/pull/1079

* test(gateway): add MaxRequestDuration integration test

verifies config is wired correctly and 504 is returned when exceeded

* docs: add MaxRequestDuration to gateway production guide

---------

Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
2026-01-15 19:31:16 +01:00
Marcin Rataj
3e85793b58
docs: add production deployment guidance for gateway (#11117)
- add "Running in Production" section to gateway.md
- link to specs.ipfs.tech instead of github
- update "Protocol Labs" to "IPFS Foundation"
- add reverse proxy requirement to config.md PublicGateways section
- reference reverse proxy, timeout, rate limiting, and CDN caveats
2026-01-09 18:26:32 +01:00
Marcin Rataj
5af3cc1c02
docs: updated links and refs to external resources (#10368) 2024-03-16 00:59:22 +01:00
Henrique Dias
e22f47ae4b
core/corehttp!: remove /api/v0 from gateway port 2024-03-05 08:21:13 +00:00
Henrique Dias
595e1ba268
repo/fsrepo/migrations: verified HTTP migrations (#10324) 2024-02-19 14:20:58 +01:00
Seungbae Yu
cb280cbf16
docs: replace docs.ipfs.io with docs.ipfs.tech (#9158)
* docs: fix redirecting URL in README.md
* all: replace `docs.ipfs.io` with `docs.ipfs.tech`
* apply suggestions from code review

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-08-05 19:01:10 +03:00
Marcin Rataj
8565bbb75c
refactor: kubo in ./docs 2022-07-06 23:45:25 +02:00
Marcin Rataj
d6de97b417
docs: gateway.md (#8825)
Adds link to relevant pages at docs.ipfs.io
2022-03-28 16:31:36 +02:00
Marcin Rataj
4cabdfefbf
feat(gateway): Block and CAR response formats (#8758)
* feat: serveRawBlock implements ?format=block
* feat: serveCar implements ?format=car
* feat(gw): ?format= or Accept HTTP header

- extracted file-like content type responses to separate .go files
- Accept HTTP header with support for application/vnd.ipld.* types

* fix: use .bin for raw block content-disposition

.raw may be handled by something, depending on OS, and .bin
seems to be universally "binary file" across all systems:
https://en.wikipedia.org/wiki/List_of_filename_extensions_(A%E2%80%93E)

* refactor: gateway_handler_unixfs.go

- Moved UnixFS response handling to gateway_handler_unixfs*.go files.
- Removed support for X-Ipfs-Gateway-Prefix (Closes #7702)

* refactor: prefix cleanup and readable paths

- removed dead code after X-Ipfs-Gateway-Prefix is gone
  (https://github.com/ipfs/go-ipfs/issues/7702)
- escaped special characters in content paths returned with http.Error
  making them both safer and easier to reason about (e.g. when invisible
  whitespace Unicode is used)
2022-03-17 17:15:24 +01:00
Manuel Alonso
edb32ac3d7
chore(gateway): debug logging for the http requests (#8518)
* chore(gateway): better logging for the http requests

* chore(gateway): removed defer and add more data to the final log

* chore(gateway): debug logging refactor

* chore(gateway): use debug w/o context when only msg

* doc: add cmd for log level

* chore: add more logs and address fedback

* chore(gateway): log subdomains and from=requestURI, refactor

* chore(gateway): fix debug redirect
2022-02-15 17:13:09 -05:00
Marcin Rataj
fd01acdfc0
feat(gateway): ?filename with download=true
This implements 'attachment' mode triggered then
?filename parameter is accompanied with &download=true

When Content-Disposition: attachment is detected by a modern browser
it will skip rendering and immediately open the "save as" dialog,
making this useful feature for using IPFS gateway as target of
"Download" links on various websites.

Parameter name was suggested in:
https://github.com/ipfs/go-ipfs/pull/4177#issuecomment-414870327
2020-09-16 22:15:18 +02:00
Steven Allen
e6968c9f22 doc(gateway): document dnslink 2019-11-15 16:53:25 -08:00
Steven Allen
9886fc06fc switch to base32 by default for CIDv1
fixes #6220

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-05-13 10:57:53 -07:00
Steven Allen
f21b4cd30a docs: add some minimal read-only API documentation
fixes #5436

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-06 17:47:11 -07:00
Steven Allen
d5f67d5d7e fix the default gateway port
reported by @sixcorners in
https://github.com/ipfs/go-ipfs/pull/5393#issuecomment-417908209

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-02 09:37:43 -07:00
Steven Allen
1af6717eff add some basic gateway documentation
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-08-20 15:53:10 -07:00