Azure / Azure/azure-functions-host

Incorrect IP addreses in x-forwarded-for header for IPv6 addresses

Open
#3,790 0 comments 0 reactions 0 assignees View on GitHub
needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

- Function App version: 2.0
- Function App language: Node.js

I am relying on `x-forwarded-for` header to determine IP address of an HTTP request, and it works very well for IPv4 addresses. However, when I make a request from a device with an IPv6 address, the information in the header is wrong. Specifically, instead of containing my IPv6 address, it contains some other IPv4 address.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing an HTTP request to a Function App 2.0 endpoint from an IPv6 client and inspect the x-forwarded-for header, comparing it with an IPv4 request. Trace the Azure Functions host request handling that populates the header; done means the header preserves the originating IPv6 address instead of substituting an unrelated IPv4 address.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, node.js
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.