Score:0

apache proxy forward to a dynamic url set in the http header

us flag

I have an app server, which uses an apache server as a forward proxy to access the Internet. The forward proxy config on the apache server looks like:

<VirtualHost 10.10.10.1:8080>
  ProxyRequests On
  SSLProxyEngine On

  ProxyPass        / https://internet.com/api
  ProxyPassReverse / https://internet.com/api

  <Location />
      ....
  </Location>
</VirtualHost>

The config works perfectly until we have some dynamic endpoints, which means we don't know the forward url until the request coming in. The forward url will be set in the incoming http request's header.

I am wondering is it possible to get the dynamic endpoints from the header and forward it to the endpoints using apache?

Thanks in advance!

djdomi avatar
za flag
please share why you dont know the endpoint?
us flag
The endpoint will be in the incoming http request's header. it's no longer "https://internet.com/api" as hard coded in the config file.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.