File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
apps/sim/app/ingest/[[...path]] Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,12 @@ function buildTargetUrl(pathname: string, search: string): { url: string; hostna
2121
2222/**
2323 * Builds forwarding headers for the PostHog request.
24- * Sets the Host header, forwards client IP for geolocation,
25- * and strips cookies/connection headers that shouldn't be forwarded.
24+ * Sets the Host header and strips cookies/connection headers
25+ * that shouldn't be forwarded.
2626 */
2727function buildHeaders ( request : NextRequest , hostname : string ) : Headers {
2828 const headers = new Headers ( request . headers )
2929 headers . set ( 'host' , hostname )
30-
31- const forwardedFor = request . headers . get ( 'x-forwarded-for' )
32- if ( forwardedFor ) {
33- headers . set ( 'x-forwarded-for' , forwardedFor )
34- }
35-
3630 headers . delete ( 'cookie' )
3731 headers . delete ( 'connection' )
3832
@@ -54,6 +48,7 @@ async function handler(request: NextRequest) {
5448
5549 const responseHeaders = new Headers ( response . headers )
5650 responseHeaders . delete ( 'content-encoding' )
51+ responseHeaders . delete ( 'content-length' )
5752 responseHeaders . delete ( 'transfer-encoding' )
5853
5954 return new NextResponse ( response . body , {
You can’t perform that action at this time.
0 commit comments