# Translate from NGINX reverse proxy to Kong

**URL:** <https://discuss.konghq.com/t/translate-from-nginx-reverse-proxy-to-kong/2085>\
**Category:** Questions\
**Created:** [October 11, 2018, 12:24pm UTC](https://discuss.konghq.com/t/translate-from-nginx-reverse-proxy-to-kong/2085 "2018-10-11T12:24:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaquin386](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@joaquin386](https://discuss.konghq.com/u/joaquin386)\
**Post date:** [October 11, 2018, 12:24pm UTC](https://discuss.konghq.com/t/translate-from-nginx-reverse-proxy-to-kong/2085/1 "2018-10-11T12:24:03Z")

</div>

Hi people

I have this nginx config and want to translate it to a Kong API:  
location = /omni-api/agents {  
proxy\_pass httx://api.codename.company.com:8083/agents;  
proxy\_read\_timeout 90;  
proxy\_connect\_timeout 90;  
proxy\_redirect off;  
proxy\_set\_header X-CLIENT\_CODE 284;  
}  
location = /omni-api/dead {  
proxy\_pass httx://api.codename.company.com:8083/agents/dead;  
proxy\_read\_timeout 90;  
proxy\_connect\_timeout 90;  
proxy\_redirect off;  
proxy\_set\_header X-CLIENT\_CODE 284;  
}

Should be: (?)  
curl -i -X POST   
–url [http://localhost:8001/services/](http://localhost:8001/services/)   
–data ‘name=codename-agents’   
–data ‘url=httx://api.codename.company.com:8083/agents’  
curl -i -X POST   
–url [http://localhost:8001/services/](http://localhost:8001/services/)   
–data ‘name=codename-agents-dead’   
–data ‘url=httx://api.codename.company.com:8083/agents/dead’  
Then the route:  
curl -i -X POST   
–url httx://localhost:8001/services/codename-agents/routes   
–data ‘hosts=codename-agents’  
curl -i -X POST   
–url httx://localhost:8001/services/codename-agents-dead/routes   
–data ‘hosts=codename-agents-dead’

It seems a lot of repetition … and how to add a default header to be added? (X-CLIENT\_CODE 284)

Thx

Jo

---

<div class="post-metadata">

**Author:** ![joaquin386](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@joaquin386](https://discuss.konghq.com/u/joaquin386)\
**Post date:** [October 11, 2018, 2:03pm UTC](https://discuss.konghq.com/t/translate-from-nginx-reverse-proxy-to-kong/2085/2 "2018-10-11T14:03:12Z")

</div>

Ok to add the header (X-CLIENT\_CODE 284) would be “Request Transformer” plugin.  
But how can I not repeat myself from the request above?
