diff --git a/src/Server/Transport/StreamableHttpTransport.php b/src/Server/Transport/StreamableHttpTransport.php index 2b1e686..24b2e10 100644 --- a/src/Server/Transport/StreamableHttpTransport.php +++ b/src/Server/Transport/StreamableHttpTransport.php @@ -242,6 +242,10 @@ class StreamableHttpTransport extends BaseTransport ->withHeader('Content-Type', 'application/json') ->withBody($this->streamFactory->createStream($payload)); + if (405 === $statusCode) { + $response = $response->withHeader('Allow', 'POST, DELETE, OPTIONS'); + } + return $this->withCorsHeaders($response); }