You can use my `json-rpc-mixin` package with my advanced CORS supporting `routeDORequest`. I recomme

You can use my
json-rpc-mixin
package with my advanced CORS supporting
routeDORequest
. I recommend the whitelist approach. See: https://lumenize.com/docs/utils/route-do-request#cors-support

However, the latest version of
routeAgentRequest
which is what
json-rpc-mixin
shows using in the docs has all or nothing CORS support. The third parameter is a config object and
{ cors: true }
will allow all cross origins.
Route HTTP and WebSocket requests to Durable Objects with authentication hooks
Was this page helpful?