Custom headers for Reverse Proxy in netlify.toml


I have a commercial website running on Netlify ( as a test environment)

My blog is running on a hosted Wordpress platform called Kinsta.
The blog is available through, but I would like to set up a reverse proxy to make the blog available at

I have already contacted Kinsta to set up the reverse proxy on their side, which seems to be done.
Still, these configuration usually require some set up on the main domain server.

On nginx it would be something like this:

location ^~ /blog/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_ssl_name $proxy_host ;
proxy_ssl_server_name on;

How could I replicate such a configuration using the netlify.toml?

Based on your comment in the helpdesk, this appears to be resolved.

Hi @hrishikesh I’m having the same issue and I’m not sure how to configure Netlify to pass the correct client IP so that my wordpress site on Kinsta sees it correctly. I’m also using Wordfence plugin which needs either X-Forwarded-For or X-Real-IP to have the client IP. Can you please let me know how do that?

You should be able to add this to your build setting settings in the UI and then trigger a new build to update. What happens when you do that?

Sorry, I’m not sure what you mean. Can you please give an example of how exactly I do that?

I believe Netlify already forwards that header. There’s no configuration on Netlify’s end that can help you modify it.