Skip to content

Commit

Permalink
Set secure cookies by default when process.env.NODE_ENV is not develo…
Browse files Browse the repository at this point in the history
…pment
  • Loading branch information
Neo-Ciber94 committed Oct 8, 2023
1 parent 869a362 commit 3f1251c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/animelist-auth/src/server/handlers/fetchHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ export async function handleAuthFetchRequest(
}

async function handleAuth(event: RequestEvent, options: HandleAuthOptions) {
const isDev = process.env.NODE_ENV === 'development';

const {
apiUrl,
sessionDurationSeconds = DEFAULT_SESSION_DURATION_SECONDS,
dev = true,
dev = isDev,
} = options;

const url = new URL(event.request.url);
Expand Down

0 comments on commit 3f1251c

Please sign in to comment.