Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Speedtest behind a Proxy in Nginx #27

Open
GameBoerse opened this issue Dec 26, 2020 · 2 comments
Open

Speedtest behind a Proxy in Nginx #27

GameBoerse opened this issue Dec 26, 2020 · 2 comments
Labels

Comments

@GameBoerse
Copy link

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?

@e7d
Copy link
Owner

e7d commented Jan 21, 2021

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 e7d added the question label Jan 21, 2021
@e7d
Copy link
Owner

e7d commented Jan 21, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants