Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Consider URLs to a public API:

https://api.example.com/items
https://api.example.com/add
https://api.example.com/remove
...

Internally, the calls are being served from local URLs, for example: 1.2.3.4:8080/get_items. In order to hide the internal URLs, there is a middleware that fetches the data from the internal URls and serves it to the external ones.

What is the proper name for the middleware that fetches the information from the internal URL and serves it to the public API?

"Proxy" seems to general, and "URL rewriter" seems too narrow.

share|improve this question
    
are you on about binding the ip address to a physical domain name? –  Liam Sorsby Feb 5 at 11:35
    
@LiamSorsby It's a part of the function - I am also mapping an external url to an internal one (e.g. /items to /get_items). –  Adam Matan Feb 5 at 12:00
    
Ah so you are routing the urls in your API similar to how an MVC framework works? –  Liam Sorsby Feb 5 at 12:10
1  
You're right, it has nothing to do with REST - it's about the technical name of the url rewriting component. Fixed my question accordinglt. –  Adam Matan Feb 5 at 12:18
1  
@AdamMatan Based on your earlier question here, I understood that you were running a separate internal server. Apache mod_rewrite can be used to remove ports, but in this case, you'd need a proxy server. I'm therefore editing out mod_rewrite because it might confuse others. –  dan Feb 5 at 16:11

1 Answer 1

up vote 1 down vote accepted

What is the proper name for the middleware that fetches the information from the internal URL and serves it to the public API?

A reverse proxy or gateway:

A reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as though they originated from the server itself (or servers themselves).

Also, see the Apache docs on mod_proxy:

A reverse proxy (or gateway) by contrast, appears to the client just like an ordinary web server... The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin.

A typical usage of a reverse proxy is to provide Internet users access to a server that is behind a firewall.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.