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:
commit
95200b5467
1 changed files with 97 additions and 0 deletions
|
|
@ -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?
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue