Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/actor-core/src/manager/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ export function createManagerRouter(

// Apply CORS middleware if configured
if (appConfig.cors) {
app.use("*", cors(appConfig.cors));
app.use("*", async (c, next) => {
const path = c.req.path;

// Don't apply to WebSocket routes, see https://hono.dev/docs/helpers/websocket#upgradewebsocket
if (path === "/manager/inspect" && appConfig.inspector.enabled) {
return next();
}

return cors(appConfig.cors)(c, next);
});
}

app.get("/", (c) => {
Expand Down
Loading