Allow signing up forever without Brevo.

Also allow logins from local IPs (related to #5).
This commit is contained in:
Bruno Bernardino
2024-04-08 20:53:28 +01:00
parent 4f97609ebb
commit 5a85dd224e
8 changed files with 40 additions and 14 deletions

View File

@@ -152,7 +152,9 @@ export async function logoutUser(request: Request) {
name: COOKIE_NAME,
value: '',
expires: tomorrow,
domain: isRunningLocally(request) ? 'localhost' : baseUrl.replace('https://', ''),
domain: isRunningLocally(request)
? 'localhost'
: baseUrl.replace('https://', '').replace('http://', '').split(':')[0],
path: '/',
secure: isRunningLocally(request) ? false : true,
httpOnly: true,