Hi Julian, see scaladsl/Http.scala for all the glue code between TCP and HTTP. The hard thing will be getting the metadata from the proxy implementation into the requests but I guess putting it in a @volatile var after reading it and mapping each request would make for a simple solution.
In case you get this done, I guess your PROXY implementation and its integration with HTTP would make a nice PR ;) HTH Johannes On Monday, October 5, 2015 at 6:50:03 PM UTC+2, Julian Howarth wrote: > > Are there any plans to add proxy protocol support for akka-http? If not, > how difficult would it be to manually configure in support via a > flow/stage? > > > The reason we needed is specific but possibly not uncommon: > > > - we currently use akka-http to provide a websocket api which works very > well > > - we deploy on AWS > > - we use an AWS Elastic load balancer to distribute traffic to our > websocket instances > > > The above all works without issue, but we now need to identify the IP > addresses that the websocket connections originate from. > > > For HTTP(S) connections, AWS ELB adds an X-Forwarded-For header which > is already supported in akka-http. However, in order to use AWS ELB for > websocket connections, the ELB needs to be configured to listen using TCP > rather than HTTP which means there is no X-Forwarded-For header and instead > the proxy protocol is used. > > > We already have a stateful stage that manages the proxy protocol for our > TCP connections but what I need some guidance with is how to use that when > using the HTTP bindings. Any ideas? > > > Thanks, > > > Julian > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
