We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 365de24 commit d51d618Copy full SHA for d51d618
packages/actor-core/src/actor/runtime/actor_router.ts
@@ -83,7 +83,16 @@ export function createActorRouter(
83
84
// Apply CORS middleware if configured
85
if (config.cors) {
86
- app.use("*", cors(config.cors));
+ app.use("*", async (c, next) => {
87
+ const path = c.req.path;
88
+
89
+ // Don't apply to WebSocket routes, see https://hono.dev/docs/helpers/websocket#upgradewebsocket
90
+ if (path === "/connect/websocket" || path === "/inspect") {
91
+ return next();
92
+ }
93
94
+ return cors(config.cors)(c, next);
95
+ });
96
}
97
98
app.get("/", (c) => {
0 commit comments