Prerequisites
Fastify version
5.8.3
Plugin version
No response
Node.js version
20.x
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
Microsoft Windows Server 2022
Description
req.ip is not filled, getting undefined.
for Windows servers which mostly run with Plesk and IISNODE the web.config is configured with <iisnode enableXFF="true"/> in order to get the IP address of the visitor.
and in Fastify the instance is created with trustProxy: 1, setting to true won't be good because IISNODE appends user's X-Forwarded-For so it can be spoofed. So setting to 1 is the correct method.
but after version 5.8.3, the req.ip variable is undefined!
help is appreciated.
Link to code that reproduces the bug
Not sure how to do this
Expected Behavior
No response
Prerequisites
Fastify version
5.8.3
Plugin version
No response
Node.js version
20.x
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
Microsoft Windows Server 2022
Description
req.ip is not filled, getting undefined.
for Windows servers which mostly run with Plesk and IISNODE the web.config is configured with
<iisnode enableXFF="true"/>in order to get the IP address of the visitor.and in Fastify the instance is created with
trustProxy: 1, setting to true won't be good because IISNODE appends user'sX-Forwarded-Forso it can be spoofed. So setting to 1 is the correct method.but after version 5.8.3, the req.ip variable is undefined!
help is appreciated.
Link to code that reproduces the bug
Not sure how to do this
Expected Behavior
No response