fix: change cookie setting, prevent form trigger twice

This commit is contained in:
wancat committed 2023-09-18 23:37:25 +08:00
1 parent 248355a2f5
commit b8e520152b
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ const goBack = () => {
</p> </p>
<button <button
class="inline-flex justify-center rounded-lg text-sm font-black py-2 mt-3 bg-text-primary text-background w-full" class="inline-flex justify-center rounded-lg text-sm font-black py-2 mt-3 bg-text-primary text-background w-full"
@click="handleSubmit" type="submit"
> >
<span v-if="isRegister">Sign up</span> <span v-if="isRegister">Sign up</span>
<span v-else>Log in / Sign up</span> <span v-else>Log in / Sign up</span>
+2 -2
View File
@@ -10,8 +10,8 @@ export default session({
rolling: true, rolling: true,
cookie: { cookie: {
httpOnly: true, httpOnly: true,
secure: config.isProduction, secure: false,
sameSite: 'strict', sameSite: 'lax',
maxAge: config.sessionMaxAge, maxAge: config.sessionMaxAge,
}, },
store: MongoStore.create({ store: MongoStore.create({