What is the name of the operation when we make an ajax request to the internal server that in turn takes information from external?

Asked

Viewed 213 times

12

I always do that, but I don’t know what the technical name of it is.

When I need to make a request, where I take information from an external content (for example facebook), I always use my server (through PHP) and capture this request, only to capture it via ajax.

Thus remaining:

Imagem explicando o problema.

Talking to some friends here at SOPT, they told me his name is Proxying, but still I was left with doubts (everything I found on the internet was in English.

The name of this type of procedure is actually Proxying?

Is there any other kind of name for this type of operation?

  • 1

    If anyone can help by fixing the tags, because I’m lost even there.

  • 1

    Maybe cross-Omain?

  • 1

    Cross-Domain refers to web applications that communicate outside your web domain/server. This can be in the form of network requests to other servers or data sharing with DOM components served from different compound domains on the same web page.

  • 1

    I guess I had to put the little arrows! AJAX -> INTERNAL -> EXTERNAL

2 answers

11


Proxy in English means attorney, representative.

In the context of computing, it’s any server that acts as an intermediary for clients asking for resources from other servers - and then you realize why the analogy of prosecutor makes sense:

  • When you appoint someone as your attorney, they get permission to do things that are of interest to you. According to the Houaiss dictionary,'the one who plays a role middleman between the interested parties.
  • When you use a proxy server, it makes requests that are of interest to you to then return, playing a role middleman between the client and the final resource server, as well as the prosecutor.

The act of using procedures with a proxy server is called proxying. The operation you do is usual and in the most orthodox way possible, with nothing that misrepresents the concept, so I see no point in calling it anything other than proxying.

  • I like to use it to dribble the Access-Control-Allow-Origin

9

The name of this type of procedure is actually Proxying?

Yes, is. Of wikipedia article,

a proxy (in Portuguese prosecutor) is a server that acts as an intermediary for client requests requesting resources from other servers.

It is a widely used solution currently to avoid conflicts with CORS specifications.

Is there any other kind of name for this type of operation?

There are several. Because it is a feature embedded in a web service, the intermediate server may also be called Broker, and the operation itself, Brokerage.

If the service simply forwards HTTP calls, encapsulating calls in the format expected by the target server, it can also be called tuneller.

  • 1

    Broker I would translate as "broker" (that’s right?)

  • 2

    @bfavaretto that’s the commercial sense - in this case, I think 'agent' for being an imported term of process architecture, works a little better. Or maybe 'middleman''.

  • 1

    The HTTP tunneling technique is not related to the situation described by AP. It is used to circumvent the limitations of an environment with restricted network access or to access a network with restricted access. In the situation described, it makes no sense to forward requests in a "blind" way, as this would be a waste of resources and/or would open a security gap.

  • 3

    @That’s not exactly true. What you describe is a type of proxy socket implementation where multiple protocols can be encapsulated in an HTTP call, usually under encryption, which is able to travel between network segments with limitations imposed on the original protocols. Still, a service implementation that simply maps local Uris (http://localhost/serverwith/url.ext) to Uris from a remote service (http://serverwith/url.ext) is also called tunneling.

  • 2

    @rodorgas referência - http://programmers.stackexchange.com/questions/171412/rest-api-rule-about-tunneling

  • :p is right! + 1

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.