Quick Start
1
Public endpoint, no cookies
2
Browser app with cookies
How It Works
The same rule applies to the async jobs server when you pass
cors_origins to praisonai.jobs.server.create_app.
The
Authorization header still works with ["*"] when your client sends it without credentials: "include" — for example, a bearer token from your API key.Why
With a"*" origin and credentials both enabled, Starlette’s CORS middleware echoes the caller’s Origin header back when a cookie is present. Any website could then make logged-in requests to your deployment. Browsers forbid * with credentials for this reason, and AgentOS enforces the same rule on the server.
Best Practices
List exact frontend origins in production
List exact frontend origins in production
Use
cors_origins=["https://app.example.com"] instead of ["*"] for any deployed frontend.Never mix "*" with other origins
Never mix "*" with other origins
One
"*" entry turns credentials off for the whole list.Check browser clients after upgrading
Check browser clients after upgrading
If cookie-based browser calls stopped working after an upgrade, you were relying on
["*"] with credentials. Switch to an explicit origin list.Related
AgentOS
AgentOS configuration and lifecycle
Async Jobs
Jobs server that follows the same CORS rule

