Browsed by
Tag: proxy

Request data through a proxy with GuzzleHttp – PSR-7 compliant

Request data through a proxy with GuzzleHttp – PSR-7 compliant

When a Magento shop – or any other PHP application – is required to request data from or transmit data to a remote server, it is often necessary to redirect the traffic through a Http-proxy server. In my case this was essential because the called endpoint allows only certain IP addresses to access the requested ressource. Since I am working from various locations, each having a different IP address, I had to find a way that certain Http-requests are routed…

Read More Read More

How to add alternative HTTP headers to Magento 2?

How to add alternative HTTP headers to Magento 2?

If you have more than one frontend server running in your business, it’s needed to load balance the traffic between the nodes. In this case we have a new instance between the browser and the web-server. Often it’s a system like HAProxy or Varnish. If the load balancer or proxy receives a request from a browser, it forwards it to backend server in the internal network. The IP address of the client is than added to a forward header which contains…

Read More Read More

Docker: Simplified container mapping for local development

Docker: Simplified container mapping for local development

When you are working with docker on your local machine, you often have to map your local ports to different container and end up in a port-mapping-mess like this: localhost:80 -> Local apache for native stuff localhost:8080 -> Docker container with apache for testing localhost:8100 -> Some sort of dockered WebApp … localhost:59924 -> “Yea, well … don’t know, lets check docker process-list …” To simplify this mess, we created a little proxy-script (+ environment setup) that will make your life…

Read More Read More