fix: 🐛 correctly identify cloudflare cache as requesting host for READ event
This commit is contained in:
parent
0ba9d74a83
commit
75d6ae868f
@ -2,9 +2,7 @@ import type { EncryptedNote } from '$lib/model/EncryptedNote';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
|
||||
export const get: RequestHandler = async ({ request, clientAddress, params }) => {
|
||||
const ip = (request.headers.get('cd-connecting-ip') ||
|
||||
request.headers.get('x-forwarded-for') ||
|
||||
clientAddress) as string;
|
||||
const ip = (request.headers.get('x-forwarded-for') || clientAddress) as string;
|
||||
const url = `${import.meta.env.VITE_SERVER_INTERNAL}/api/note/${params.id}`;
|
||||
const response = await fetch(url, {
|
||||
headers: {
|
||||
|
Loading…
Reference in New Issue
Block a user