Commit 3cf2bf4 1 parent c78e98a commit 3cf2bf4 Copy full SHA for 3cf2bf4
File tree 1 file changed +8
-2
lines changed
src/mcp_grafana/transports
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -179,10 +179,16 @@ async def http_rw():
179
179
logger .debug ("Waiting for request body" )
180
180
body = await write_stream_reader .receive ()
181
181
182
- logger .debug (f"Connecting to HTTP endpoint: { url } " )
182
+ u = httpx .URL (url )
183
+ u_cleaned = (
184
+ u
185
+ if u .userinfo == b""
186
+ else u .copy_with (username = "<redacted>" , password = "<redacted>" )
187
+ )
188
+ logger .debug (f"Connecting to HTTP endpoint: { u_cleaned } " )
183
189
async with httpx .AsyncClient (headers = headers ) as client :
184
190
response = await client .post (
185
- url , content = body .model_dump_json (by_alias = True )
191
+ u , content = body .model_dump_json (by_alias = True )
186
192
)
187
193
logger .debug (f"Received response: { response .status_code } " )
188
194
message = types .JSONRPCMessage .model_validate_json (response .content )
You can’t perform that action at this time.
0 commit comments