|
| 1 | +<!-- Autogenerated by weave; DO NOT EDIT --> |
| 2 | + # Backwards compatibility and MCPGODEBUG |
| 3 | + |
| 4 | + According to our compatibility promise, we can't break backward compatibility |
| 5 | + of the SDK API. However, sometimes we need to change the behavior of the SDK |
| 6 | + in a backward-incompatible way in order to fix bugs or security issues. |
| 7 | + In those cases we introduce temporary compatibility parameters, that can be |
| 8 | + used to opt-out of the new behavior. They are usually maintained for two |
| 9 | + minor release cycles and then removed. |
| 10 | + |
| 11 | + The compatibility parameters are provided via the `MCPGODEBUG` environment |
| 12 | + variable. The value of the variable is a comma-separated list of parameter |
| 13 | + value assignments, e.g.: |
| 14 | + |
| 15 | + ``` |
| 16 | + MCPGODEBUG=parameter1=value1,parameter2=value2 |
| 17 | + ``` |
| 18 | + |
| 19 | +## `MCPGODEBUG` history |
| 20 | + |
| 21 | +### 1.4.1 |
| 22 | + |
| 23 | +Options listed below will be removed in the 1.6.0 version of the SDK. |
| 24 | + |
| 25 | +- `disablecrossoriginprotection` added. If set to `1`, newly added cross-origin |
| 26 | + protection will be disabled. The default behavior was changed to enable |
| 27 | + cross-origin protection. |
| 28 | + |
| 29 | +### 1.4.0 |
| 30 | + |
| 31 | +Options listed below will be removed in the 1.6.0 version of the SDK. |
| 32 | + |
| 33 | +- `jsonescaping` added. If set to `1`, JSON marshaling will preserve the previous |
| 34 | + behavior of escaping HTML characters in JSON strings. The default behavior |
| 35 | + was changed to not escape HTML characters, to be consistent with other SDKs. |
| 36 | + |
| 37 | +- `disablelocalhostprotection` added. If set to `1`, newly added DNS rebinding |
| 38 | + protection will be disabled. The default behavior was changed to enable DNS rebinding |
| 39 | + protection. The protection can also be disabled by setting the |
| 40 | + `DisableLocalhostProtection` field in the `StreamableHTTPOptions` struct to |
| 41 | + `true`, which is the recommended way to disable the protection long term. |
0 commit comments