Skip to content

Commit ff46f33

Browse files
committed
fix(webapp): allow JWT + CORS on sessions list endpoint
Without allowJWT/corsStrategy, frontend clients holding public access tokens hit 401 on GET /api/v1/sessions and browser preflights fail. Matches the single-session GET/PATCH/close routes and the runs list endpoint.
1 parent 28323b7 commit ff46f33

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/webapp/app/routes/api.v1.sessions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ function asArray<T>(value: T | T[] | undefined): T[] | undefined {
2626
export const loader = createLoaderApiRoute(
2727
{
2828
searchParams: ListSessionsQueryParams,
29+
allowJWT: true,
30+
corsStrategy: "all",
2931
findResource: async () => 1,
3032
},
3133
async ({ searchParams, authentication }) => {

0 commit comments

Comments
 (0)