solve not being able to correctly obtain CF IP
This commit is contained in:
parent
9446903c5b
commit
11fdaeeb19
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ function blobs2logs(blobs: string[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useAccessLog(event: H3Event) {
|
export function useAccessLog(event: H3Event) {
|
||||||
const ip = getHeader(event, 'x-real-ip') || getRequestIP(event, { xForwardedFor: true })
|
const ip = getHeader(event, 'cf-connecting-ip') || getHeader(event, 'x-real-ip') || getRequestIP(event, { xForwardedFor: true })
|
||||||
|
|
||||||
const { host: referer } = parseURL(getHeader(event, 'referer'))
|
const { host: referer } = parseURL(getHeader(event, 'referer'))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue