openstreetmap / openstreetmap/mod_tile

ModTileEnableTileThrottlingXForward=1 seems to block proxy requests

Open
#76 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
318
Forks
199
PR merge metrics
No merged PRs in 30d

Description

When configuring a tile server with ModTileEnableTileThrottlingXForward=1, I didn't get any answer when using X-Forwarded-for, but the same request without this header worked correctly. As soon as I changed the server configuration to ModTileEnableTileThrottlingXForward=0, the request worked correctly.

$ curl -v -H "Via: 1.1 guenievre (squid/3.3.8)" -H "Cache-Control: max-age=259200" -H "Connection: keep-alive" -A "Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 Iceweasel/29.0.1" -e "http://tile.openstreetmap.fr/" -H "DNT: 1" -H "Accept: image/png,image/*;q=0.8,*/*;q=0.5" -H "Accept-Language: fr-fr,chrome://global/locale/intl.properties;q=0.5" -H "Accept-Encoding: gzip, deflate" -H "X-Forwarded-For: 10.1.2.22" http://a.tile.openstreetmap.fr/osmfr/6/32/25.png >/dev/null
* Hostname was NOT found in DNS cache
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 2a01:e0d:1:c:58bf:fac1:0:13...
* Connected to a.tile.openstreetmap.fr (2a01:e0d:1:c:58bf:fac1:0:13) port 80 (#0)
> GET /osmfr/6/32/25.png HTTP/1.1
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 Iceweasel/29.0.1
> Host: a.tile.openstreetmap.fr
> Referer: http://tile.openstreetmap.fr/
> Via: 1.1 guenievre (squid/3.3.8)
> Cache-Control: max-age=259200
> Connection: keep-alive
> DNT: 1
> Accept: image/png,image/*;q=0.8,*/*;q=0.5
> Accept-Language: fr-fr,chrome://global/locale/intl.properties;q=0.5
> Accept-Encoding: gzip, deflate
> X-Forwarded-For: 10.1.2.22
> 
* Empty reply from server
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host a.tile.openstreetmap.fr left intact
curl: (52) Empty reply from server

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with ModTileEnableTileThrottlingXForward=1 using the provided curl request, then compare it with the same request without X-Forwarded-For and with the setting disabled. Trace the module's handling of the X-Forwarded-For header and confirm that proxied tile requests receive a normal response without breaking direct requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, cpp
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.