79394651

Date: 2025-01-28 17:21:06
Score: 1.5
Natty:
Report link

For me solution was like this:

// hooks.server.ts
import { building } from '$app/environment'

export const handle: Handle = async (p) => {
    if(building){
        // apply different logic here
    } else {
        const clientIp = p.event.getClientAddress()
    }
}

more details: https://svelte.dev/docs/kit/$app-environment#building

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Lex