Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPIP-280: App Conventions for HTTP Gateway Detection #280

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
a few more linter fixes
  • Loading branch information
markg85 committed Nov 26, 2022
commit ed0fe2279bef683ae4f9595ffe14a156c9a51296
5 changes: 3 additions & 2 deletions INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gateway Integration

![](https://img.shields.io/badge/status-reliable-green.svg?style=flat-square)
![Specification status is reliable](https://img.shields.io/badge/status-reliable-green.svg?style=flat-square)

**Author(s)**:
- [Mark Gaiser](https://github.com/markg85/)
Expand Down Expand Up @@ -77,13 +77,14 @@ The decision tree is influences by a couple environement variables.

### Gateway from command argument

**This feature is optional and only for applications integrating IPFS support.**
**This feature is optional and only for applications integrating IPFS support.**

An application can opt to support a command line option to provide a gateway. If a user does provide this option then it should overrule any other gateway detection and be used as the gateway of choice. If implemented, it's recommended to go for either a `--gateway` or `--ipfs-gateway` argument. It depends very much on the application itself as to which option is most sensible.

An example implementation that is doing this is ffmpeg with the ffplay utility. It allows the `-gateway` argument which by default is empty but can be set like: `-gateway http://127.0.0.1:8080` and would then be used to handle `ipfs://<cid>` or `ipns://<cid>`.

### Gateway from IPFS_GATEWAY environment variable

When there is no command line argument, the `IPFS_GATEWAY` environment is next. If it contains a value, it will be used as gateway.

### Gateway file
Expand Down