feat: pass x-forwarded-for to indexer

This commit is contained in:
DIYgod
2023-05-23 21:18:25 +01:00
parent ece6675667
commit 4bd617af64
+8 -3
View File
@@ -82,9 +82,14 @@ export default function RootLayout({
const colorScheme = getColorScheme()
// For viewing statistics
updateIndexerFetchOptions({
headers: headers(),
})
const ip = headers().get("x-xlog-ip")
if (ip) {
updateIndexerFetchOptions({
headers: {
"x-forwarded-for": ip || "",
},
})
}
return (
<html lang={lang} dir={dir(lang)} className={colorScheme}>