refactor: make Server class framework-agnostic by moving express to separate module (#1223)
This commit is contained in:
parent
401a189fb8
commit
7c9257cdf5
1 changed files with 93 additions and 92 deletions
|
|
@ -105,7 +105,7 @@ export interface StreamableHTTPServerTransportOptions {
|
|||
* List of allowed host header values for DNS rebinding protection.
|
||||
* If not specified, host validation is disabled.
|
||||
* @deprecated Use the `hostHeaderValidation` middleware from `@modelcontextprotocol/sdk/server/middleware/hostHeaderValidation.js` instead,
|
||||
* or use `createMcpExpressApp` from `@modelcontextprotocol/sdk/server/index.js` which includes localhost protection by default.
|
||||
* or use `createMcpExpressApp` from `@modelcontextprotocol/sdk/server/express.js` which includes localhost protection by default.
|
||||
*/
|
||||
allowedHosts?: string[];
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ export interface StreamableHTTPServerTransportOptions {
|
|||
* List of allowed origin header values for DNS rebinding protection.
|
||||
* If not specified, origin validation is disabled.
|
||||
* @deprecated Use the `hostHeaderValidation` middleware from `@modelcontextprotocol/sdk/server/middleware/hostHeaderValidation.js` instead,
|
||||
* or use `createMcpExpressApp` from `@modelcontextprotocol/sdk/server/index.js` which includes localhost protection by default.
|
||||
* or use `createMcpExpressApp` from `@modelcontextprotocol/sdk/server/express.js` which includes localhost protection by default.
|
||||
*/
|
||||
allowedOrigins?: string[];
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ export interface StreamableHTTPServerTransportOptions {
|
|||
* Enable DNS rebinding protection (requires allowedHosts and/or allowedOrigins to be configured).
|
||||
* Default is false for backwards compatibility.
|
||||
* @deprecated Use the `hostHeaderValidation` middleware from `@modelcontextprotocol/sdk/server/middleware/hostHeaderValidation.js` instead,
|
||||
* or use `createMcpExpressApp` from `@modelcontextprotocol/sdk/server/index.js` which includes localhost protection by default.
|
||||
* or use `createMcpExpressApp` from `@modelcontextprotocol/sdk/server/express.js` which includes localhost protection by default.
|
||||
*/
|
||||
enableDnsRebindingProtection?: boolean;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue