mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 14:04:18 +02:00
Merge pull request #895 from jlowin/claude-wt-20250620-120729
This commit is contained in:
commit
fb9161d745
2 changed files with 13 additions and 2 deletions
|
|
@ -27,4 +27,9 @@ Only use HTTP transport when testing network-specific features. Prefer Streamabl
|
|||
# Only when network testing is required
|
||||
async with Client(transport=StreamableHttpTransport(server_url)) as client:
|
||||
result = await client.ping()
|
||||
```
|
||||
```
|
||||
|
||||
## Development Workflow
|
||||
|
||||
- You must always run pre-commit if you open a PR, because it is run as part of a required check.
|
||||
- When opening PRs, apply labels appropriately for bugs/breaking changes/enhancements/features. Generally, improvements are enhancements (not features) unless told otherwise.
|
||||
|
|
@ -96,7 +96,13 @@ mcp = FastMCP("MyServer")
|
|||
|
||||
# Define custom middleware
|
||||
custom_middleware = [
|
||||
Middleware(CORSMiddleware, allow_origins=["*"]),
|
||||
Middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["https://example.com", "https://app.example.com"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["GET", "POST", "OPTIONS"],
|
||||
allow_headers=["Content-Type", "Authorization"],
|
||||
),
|
||||
]
|
||||
|
||||
# Create ASGI app with custom middleware
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue