Iframe request come from client or intermediate server? - iframe

So, a Client connects to Server A, which then creates an iframe pointed at Server B. The Client submits a request through the iframe to Server B. Does Server B see the request as coming from the Client or from Server A?
Application: I have two services running on one machine, let's say one on port 443 and one on port 9090. Port 9090 is closed at the firewall, but it can be accessed from other services on the host machine. If I host a page on 443 with an iframe directed at port 9090, will that service see that request as coming from the host machine and send the data, or from the external client and drop the connection?

Server B will see the request coming from the client browser not from server A.
Generally Iframes are requesting its URL from the client browser.

Related

in real networks do servers send request to each other?

perhaps a silly question!!
in real networks, do servers send requests to each other? for example do a web server send request to another web server to fetch some data (for example .jpg and so on) ? or can a DNS server send request to another DNS server to ask an ip address?
i want to implement an algorithm for worm detection. i know servers often listen to a port and answer to the requests. so i think if a server initiate a connection , it is infected. but if in normal condition servers send requests to each other so servers can initiate connection in normal condition and so we can not say a server is infected when it initiate a connection.
thanks.

How to connect DataSnap client to DataSnap server via proxy server?

The problem is this:
I decided to make a messenger/chat (VCL application) with callback on DataSnap technology (IDE Delphi XE6), has created a simple DataSnap server (tcp / ip + http) without the database, and thick client.
All works fine if the whole thing run on a local network (tcp / ip) or via the Internet (http).Problems arise when run over HTTP and the client machine has a HTTP proxy server, the client application can not connect to my DataSnap server application. Client application gets error "10061 connection refused"
or "Expected datasnap context in request http://[YourServerIP]:[YourPort]/datasnap/tunnel".
I tried to enter IP and port of the proxy server to params of component TSQLConnection.Driver params DSProxyHost and DSProxyPort, turned off my firewall and antivirus software, checked allows traffic to the proxy ip + port, but the problem has not disappeared.
After few days searches, without results, i decided listening requests from client application and response of my DataSnap Server application in HTTPTrace procedure of DSHTTPService1 component, also with software HTTPDebugerPro, and i noticed interesting thing:
when client app connecting to ds server app without proxy server, in request ds server app receive URI with this text "/datasnap/tunnel" and all works fine ds server response "200, OK".
when client app connecting to ds server app with proxy, in request ds server app receive URI with text "http://[YourServerIP]:[YourPort]/datasnap/tunnel" and raised exception with response error "404, Expected datasnap context in request http://YourServerIP:YourPort/datasnap/tunnel".
Has anyone knows solution about this problem? How to connect DataSnap client to DataSnap server via proxy server? I searched solution for this problem several days, I shoveled the Internet but have not yet found a solution.

Sending http request behind nginx

I am not sure how to formulate my question but here we go:
I have 2 servers, one is the nginx reverse proxy and one is the app server.
In my app server, I am developing a simple http client using jerseyclient that will send a request to another server. I can do this now but the traffic goes from the app server and directly to the destination. Is it possible to it from the app server, passes through the reverse proxy server and goes to the destination?
And, is this design ok or is it an abomination?
nginx reverse proxy works only for requests outside your network.
To configure your system works as you described you have to configure firewall NAT or caching HTTP proxy like squid etc.
If you have no reasons why your servers should look as single computer - your configuration is OK.

Hole punching over http

How can I do the hole punching over http,like I have a server in godaddy
Its port access for tcp listeners is closed,so can I get the client's port
number from its request to an aspx page?
If you are using java and have access to the http request on the server side, you can get the remote address and port with the getRemoteAddr() and getRemotePort() methods in the servlet handling the request.

Can a webpage, hosted by tomcat, websocket connect over port 80 to an erlang server on the same machine as tomcat?

I would like to use tomcat to serve a web page. The webpage will make a connection using websockets over port 80. Does this mean I need a java servlet (hosted by tomcat) to listen for a websocket connection? Or can I use some other application to say written in erlang to listen for the websocket connections.
I'm confused about whether if I use tomcat to serve the webpage, I'm also forced to use it to listen for websockets over port 80. I would have tomcat and the erlang app on the same machine.
The WebSocket server could be listening on some other port than the one used to serve your HTML page (80 presumably) and might even be on a separate domain/server. As long as it respects the specification, you could use any language/framework to write a WebSocket server.
There are issues of Cross Domain scripting which is usually blocked by Web Clients. However, i ask my self, why don't you let your favorite Erlang web server like Yaws or Mochiweb serve that very page from which web socket requests will be initiated?
On the same server, you can have both Tomcat and another Web server running. You can let Tomcat be on Port 80, while the other Erlang web server on say port 8080. Let the page that points to your web sockets page have the link as say: Click here to start web sockets application
You can as well do port forwarding and stuff like that on your Server room firewall (router) to map requests incoming on one port to another

Resources