Skip to content
Merged
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
6 changes: 5 additions & 1 deletion src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const handle: Handle = async ({ event, resolve }) => {
});
}
} else {
// Redirect to OAuth flow unless on the authorized pages (home, shared conversation, login, healthcheck)
// Redirect to OAuth flow unless on the authorized pages (home, shared conversation, login, healthcheck, model thumbnails)
if (
event.url.pathname !== `${base}/` &&
event.url.pathname !== `${base}` &&
Expand All @@ -163,6 +163,10 @@ export const handle: Handle = async ({ event, resolve }) => {
!event.url.pathname.startsWith(`${base}/healthcheck`) &&
!event.url.pathname.startsWith(`${base}/r/`) &&
!event.url.pathname.startsWith(`${base}/conversation/`) &&
!(
event.url.pathname.startsWith(`${base}/models/`) &&
event.url.pathname.endsWith("/thumbnail.png")
) &&
!event.url.pathname.startsWith(`${base}/api`)
) {
refreshSessionCookie(event.cookies, auth.secretSessionId);
Expand Down
Loading