Fastly and Piwik
Hello, we have switched our Piwik analytics to use Fastly to speed up page responses but now we are only seeing the Fastly IPs in our statistics. In the Piwik configuration we can set the following
proxy_host_headers = "HTTP_X_FORWARDED_HOST" proxy_client_headers = "HTTP_X_FORWARDED_FOR"
so what headers should we be using for Fastly ? I executed a curl -I to check the headers but could not see the originating IP address.
Hi @INNOVOT there's a quick change you can make in your Fastly config to set the X-Forwarded-For header you're receiving to client's IP address.
In the "Content" section of your configuration page, you should see a section called "Headers," where you can make this change. Click the new header button and add the following information:
- Name: Any name you would prefer
- Type/Action: Request / Set
- Destination: http.X-Forwarded-For
- Source: client.ip
- Ignore if set: no
This will set your user's X-Forwarded-For headers to the true client IP address.
Thank goodness, i was looking for piwik integration so bad.
Please sign in to leave a comment.