revert captcha
This commit is contained in:
parent
519236913e
commit
96cb799cc7
12 changed files with 12 additions and 186 deletions
|
|
@ -8,7 +8,6 @@ import { db } from '$lib/server/db';
|
|||
import { user } from '$lib/server/db/schema';
|
||||
import { eq } from 'drizzle-orm';
|
||||
import { minesCleanupInactiveGames, minesAutoCashout } from '$lib/server/games/mines';
|
||||
import { isTurnstileVerifiedRedis } from '$lib/server/redis';
|
||||
|
||||
async function initializeScheduler() {
|
||||
if (building) return;
|
||||
|
|
@ -114,7 +113,7 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|||
const userId = session.user.id;
|
||||
const cacheKey = `user:${userId}`;
|
||||
const now = Date.now();
|
||||
|
||||
|
||||
const cached = sessionCache.get(cacheKey);
|
||||
if (cached && (now - cached.timestamp) < cached.ttl) {
|
||||
userData = cached.userData;
|
||||
|
|
@ -180,12 +179,6 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|||
|
||||
event.locals.userSession = userData;
|
||||
|
||||
if (session?.user?.id) {
|
||||
event.locals.turnstileVerified = await isTurnstileVerifiedRedis(session.user.id);
|
||||
} else {
|
||||
event.locals.turnstileVerified = false;
|
||||
}
|
||||
|
||||
if (event.url.pathname.startsWith('/api/')) {
|
||||
const response = await svelteKitHandler({ event, resolve, auth });
|
||||
response.headers.set('Cache-Control', 'no-store, no-cache, must-revalidate, private');
|
||||
|
|
|
|||
Reference in a new issue