0

I have a Win32 exe program installed on hundreds of clients. This application makes an HTTP API call to retrieve information about an address based on the provided ZIP code. The exe calls an address like http://mycepapi.com/?cep=04513010, where 04513010 is the variable parameter, and receives an XML response with the following information:

<result cep="04513010" state="SP" city="São Paulo" neighborhood="Vila Nova Conceição" street="Rua Doutor Ernani Pereira" service="correios-alt"/>

Everything works perfectly, except that the server hosting this service has blocked HTTP calls, requiring them to be made using HTTPS. However, the x32 exe does not have SSL enabled, and I cannot update it to use HTTPS.

I have an Apache/2.2.25 (Win32) server running at each of these hundreds of locations, and I would like to know if it's possible to, for example, make a call to http://192.168.1.10/cep/?cep=04513010, and have Apache make the request to https://mycepapi.com/?cep=01431010 and return the generated XML.

Is it possible to achieve this with Apache in this version?

Any ideas on how I could do this with Apache?


As a last resort, I'm considering creating a CGI in a more modern language that could receive a request from Apache, perform the HTTPS query to the server, and return the values as received. However, I would like to know if Apache alone could potentially solve my problem. I appreciate any ideas or assistance in advance!

2
  • The API server that now requires HTTPS is not operated by you? I am sure you can use Apache or another server like nginx as http zomhttps bridge, but be aware that this may cause legal problems depending on the license the zip data is published under. Commented Feb 24, 2024 at 20:51
  • The server is google, my service is hosted there... I don't think I can convince them to accept http requests Commented Feb 26, 2024 at 4:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.