mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
Update http.py
This commit is contained in:
parent
b37686cf15
commit
ac95a3aaaf
1 changed files with 2 additions and 4 deletions
|
|
@ -157,9 +157,8 @@ def create_sse_app(
|
|||
Returns:
|
||||
A Starlette application with RequestContextMiddleware
|
||||
"""
|
||||
|
||||
|
||||
# Ensure the message_path ends with a trailing slash to avoid automatic redirects
|
||||
# when mounting the application. sse_path uses Route instead of Mount so no fix needed.
|
||||
if not message_path.endswith("/"):
|
||||
message_path = message_path + "/"
|
||||
|
||||
|
|
@ -311,11 +310,10 @@ def create_streamable_http_app(
|
|||
raise
|
||||
|
||||
# Ensure the streamable_http_path ends with a trailing slash to avoid automatic redirects
|
||||
# when mounting the application
|
||||
if not streamable_http_path.endswith("/"):
|
||||
streamable_http_path = streamable_http_path + "/"
|
||||
|
||||
# Add StreamableHTTP routes with or without auth
|
||||
# Add StreamableHTTP routes with or without auth
|
||||
if auth:
|
||||
auth_middleware, auth_routes, required_scopes = (
|
||||
setup_auth_middleware_and_routes(auth)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue