diff --git a/src/server/rpc/bookings.ts b/src/server/rpc/bookings.ts index 64b4cd3..404aaf1 100644 --- a/src/server/rpc/bookings.ts +++ b/src/server/rpc/bookings.ts @@ -72,26 +72,16 @@ const treatmentsKV = createTreatmentsKV("treatments"); const create = os .input(BookingSchema.omit({ id: true, createdAt: true, status: true })) - .handler(async ({ input, context }) => { + .handler(async ({ input }) => { // console.log("Booking create called with input:", { // ...input, // inspirationPhoto: input.inspirationPhoto ? `[${input.inspirationPhoto.length} chars]` : null // }); try { - // Rate limiting check - const headers = context.request?.headers || {}; - const headersObj: Record = {}; - if (headers) { - // Convert Headers object to plain object - headers.forEach((value: string, key: string) => { - headersObj[key.toLowerCase()] = value; - }); - } - const clientIP = getClientIP(headersObj); - + // Rate limiting check (ohne IP, falls Context-Header im Build nicht verfügbar sind) const rateLimitResult = checkBookingRateLimit({ - ip: clientIP, + ip: undefined, email: input.customerEmail, });