Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/mcp/server/oauth/end_to_end_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ def setup
WhoamiTool.observations.clear

@server = MCP::Server.new(name: "e2e_server", tools: [WhoamiTool])
@transport = Transports::StreamableHTTPTransport.new(@server, enable_json_response: true)
# The transport serves `mcp.example.com`, so the host is allow-listed as a deployment there would:
# DNS rebinding protection rejects any other `Host`, and WebMock 3.34 and later hand the Rack app
# the host of the request URL.
@transport = Transports::StreamableHTTPTransport.new(
@server,
enable_json_response: true,
allowed_hosts: [URI(MCP_URL).host],
)

@metadata = ProtectedResourceMetadata.new(
resource: MCP_URL,
Expand Down
Loading