Merge pull request #253 from koic/support_cors_and_accept_wildcard_for_browser_based_mcp_clients

Support CORS and Accept wildcard for browser-based MCP clients
This commit is contained in:
Koichi ITO 2026-03-15 15:31:42 +09:00 • committed by GitHub
commit 95200b5467
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -193,6 +193,8 @@ module MCP
return not_acceptable_response(required_types) unless accept_header
accepted_types = parse_accept_header(accept_header)
return if accepted_types.include?("*/*")
missing_types = required_types - accepted_types
return not_acceptable_response(required_types) unless missing_types.empty?