speedtest icon indicating copy to clipboard operation
speedtest copied to clipboard

Speedtest behind a Proxy in Nginx

Open GameBoerse opened this issue 3 years ago • 2 comments

Hey I need help wit this speedtest! istall was fine and Speedtest running without Problems but

when i call the site wit IP:5080 all is fine my ip is shown and speedtest works great

but

when i call the site via domain my speedtest dosent works correct! ( behind a Nginx proxy )

the speedtest dosent show the correkt ip! ( its shows the ip from server and not my own ip)

any solution for this? or is not Possible to bind a domain in this speedtest?

GameBoerse avatar Dec 26 '20 14:12 GameBoerse

Hello @GameBoerse,

You need to configure your nginx to forward the client IP to the speedtest server through specific headers. I'm using the lib request-ip to detect it. I'm inviting you to read the [https://www.npmjs.com/package/request-ip#how-it-works](How it works) section, indicating which header are read.

e7d avatar Jan 21 '21 08:01 e7d

You will probably need to use this module: http://nginx.org/en/docs/http/ngx_http_realip_module.html

e7d avatar Jan 21 '21 08:01 e7d