Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 26 additions & 2 deletions docs/mcpgodebug.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,37 @@

## `MCPGODEBUG` history

### 1.6.0

Options listed below were added and will be removed in the 1.8.0 version of the SDK.

- `seterroroverwrite` added. If set to `1`, `SetError` will always overwrite
`Content` with the error text, restoring the previous behavior. The default
behavior was changed to preserve existing `Content` if it has already been
populated.

- `enableoriginverification` added. If set to `1`, default (zero-value)
cross-origin protection will be applied when
`StreamableHTTPOptions.CrossOriginProtection` is nil, restoring the
behavior from v1.4.1-v1.5.0. The default behavior was changed to not
enable cross-origin protection.

- `disablelocalhostprotection` removal was postponed until 1.8.0, as it is now
also used in the SSE transport.

Options below were removed.

- `disablecrossoriginprotection` removed. It was replaced by
`enableoriginverification` after the default was changed to not enable
cross-origin protection.

### 1.4.1

Options listed below will be removed in the 1.6.0 version of the SDK.

- `disablecrossoriginprotection` added. If set to `1`, newly added cross-origin
protection will be disabled. The default behavior was changed to enable
cross-origin protection. **Removal of this option was postponed until 1.7.0.**
cross-origin protection.

### 1.4.0

Expand All @@ -39,4 +63,4 @@ Options listed below will be removed in the 1.6.0 version of the SDK.
protection. The protection can also be disabled by setting the
`DisableLocalhostProtection` field in the `StreamableHTTPOptions` or
`SSEOptions` struct to `true`, which is the recommended way to disable
the protection long term. **Removal of this option was postponed until 1.7.0.**
the protection long term. **Removal of this option was postponed until 1.8.0.**
28 changes: 26 additions & 2 deletions internal/docs/mcpgodebug.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,37 @@

## `MCPGODEBUG` history

### 1.6.0

Options listed below were added and will be removed in the 1.8.0 version of the SDK.

- `seterroroverwrite` added. If set to `1`, `SetError` will always overwrite
`Content` with the error text, restoring the previous behavior. The default
behavior was changed to preserve existing `Content` if it has already been
populated.

- `enableoriginverification` added. If set to `1`, default (zero-value)
cross-origin protection will be applied when
`StreamableHTTPOptions.CrossOriginProtection` is nil, restoring the
behavior from v1.4.1-v1.5.0. The default behavior was changed to not
enable cross-origin protection.

- `disablelocalhostprotection` removal was postponed until 1.8.0, as it is now
also used in the SSE transport.

Options below were removed.

- `disablecrossoriginprotection` removed. It was replaced by
`enableoriginverification` after the default was changed to not enable
cross-origin protection.

### 1.4.1

Options listed below will be removed in the 1.6.0 version of the SDK.

- `disablecrossoriginprotection` added. If set to `1`, newly added cross-origin
protection will be disabled. The default behavior was changed to enable
cross-origin protection. **Removal of this option was postponed until 1.7.0.**
cross-origin protection.

### 1.4.0

Expand All @@ -38,4 +62,4 @@ Options listed below will be removed in the 1.6.0 version of the SDK.
protection. The protection can also be disabled by setting the
`DisableLocalhostProtection` field in the `StreamableHTTPOptions` or
`SSEOptions` struct to `true`, which is the recommended way to disable
the protection long term. **Removal of this option was postponed until 1.7.0.**
the protection long term. **Removal of this option was postponed until 1.8.0.**
2 changes: 1 addition & 1 deletion mcp/streamable.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func (h *StreamableHTTPHandler) closeAll() {
// disablelocalhostprotection is a compatibility parameter that allows to disable
// DNS rebinding protection, which was added in the 1.4.0 version of the SDK.
// See the documentation for the mcpgodebug package for instructions how to enable it.
// The option will be removed in the 1.6.0 version of the SDK.
// The option will be removed in the 1.8.0 version of the SDK.
var disablelocalhostprotection = mcpgodebug.Value("disablelocalhostprotection")

// enableoriginverification is a compatibility parameter that restores the
Expand Down
Loading