Adds proxy to akka-http services to proxy requests to other hosts.
Adds proxy to akka-http services to proxy requests to other hosts.
If the target server is known in advance, a Proxy object can be created. This internally materializes a flow that
is continuously active and ready to route incoming requests.
For one-off requests or requests to previously unknown hosts, this trait defines two routes:
- proxySingleTo takes the original request and proxies it to the proxy URI;
- proxySingleToUnmatchedPath copies only the unmatched path from the original URI, and adds it to the path of the
proxy URI.
Adds proxy to akka-http services to proxy requests to other hosts.
If the target server is known in advance, a
Proxy
object can be created. This internally materializes a flow that is continuously active and ready to route incoming requests.For one-off requests or requests to previously unknown hosts, this trait defines two routes: -
proxySingleTo
takes the original request and proxies it to the proxy URI; -proxySingleToUnmatchedPath
copies only the unmatched path from the original URI, and adds it to the path of the proxy URI.