Skip to content

Commit

Permalink
docs: Gateway.Writable deprecation plan
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Feb 2, 2023
1 parent 4c391f8 commit 497b038
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Headers.
cmds.StringOption(initProfileOptionKwd, "Configuration profiles to apply for --init. See ipfs init --help for more"),
cmds.StringOption(routingOptionKwd, "Overrides the routing option").WithDefault(routingOptionDefaultKwd),
cmds.BoolOption(mountKwd, "Mounts IPFS to the filesystem using FUSE (experimental)"),
cmds.BoolOption(writableKwd, "Enable writing objects (with POST, PUT and DELETE, DEPRECATED)"),
cmds.BoolOption(writableKwd, "Enable legacy Gateway.Writable (deprecated)"),
cmds.StringOption(ipfsMountKwd, "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting."),
cmds.StringOption(ipnsMountKwd, "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting."),
cmds.BoolOption(unrestrictedAPIAccessKwd, "Allow API access to unlisted hashes"),
Expand Down Expand Up @@ -795,7 +795,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
}

if writable {
log.Error("serveHTTPGateway: writable gateways are DEPRECATED and will be removed in future versions")
log.Error("serveHTTPGateway: legacy Gateway.Writable is DEPRECATED and will be removed or changed in future versions. If you are still using this, provide feedback in https://github.com/ipfs/specs/issues/375")
}

listeners, err := sockets.TakeListeners("io.ipfs.gateway")
Expand Down
4 changes: 2 additions & 2 deletions config/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ type Gateway struct {
// should be redirected.
RootRedirect string

// DEPRECATED: Writable enables PUT/POST request handling by this gateway.
// Usually, writing is done through the API, not the gateway.
// DEPRECATED: Enables legacy PUT/POST request handling.
// Modern replacement tracked in https://github.com/ipfs/specs/issues/375
Writable Flag `json:",omitempty"`

// PathPrefixes was removed: https://github.com/ipfs/go-ipfs/issues/7702
Expand Down
5 changes: 4 additions & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,10 @@ Type: `string` (url)

### `Gateway.Writable`

**DEPRECATED**: A boolean to configure whether the gateway is writeable or not.
**DEPRECATED**: Enables legacy PUT/POST request handling.

This API is not standardized, and should not be used for new projects.
We are working on a modern replacement. IPIP can be tracked in [ipfs/specs#375](https://github.com/ipfs/specs/issues/375).

Default: `false`

Expand Down

0 comments on commit 497b038

Please sign in to comment.