Akka-http: Add `reverseProxy` directive

Created on 12 Sep 2016  路  10Comments  路  Source: akka/akka-http

Issue by jrudolph
_Tuesday Feb 10, 2015 at 16:33 GMT_
_Originally opened as https://github.com/akka/akka/issues/16844_


to enable simple proxying of single requests to an (internal) remote backend.

This has some security implications: What to do with cookies, authentication data, etc.? So, it may make sense to provide some safe-guards preventing people from simply relaying requests e.g. by requiring to whitelist potential targets in the configuration or something similar.

See the discussions in the original ticket spray/spray#145 and an existing PR spray/spray#764.

/cc @sirthias

help wanted 1 - triaged server routing

Most helpful comment

I used most of the logic from #324, but replaced the multiple different directives with one and a magnet. I think I've addressed all the outstanding comments that were on #324 and akka/akka#21185, but let me know if I've missed anything.

All 10 comments

Comment by rkuhn
_Tuesday Oct 20, 2015 at 08:38 GMT_


TBH: it should be called reverseProxy.

Comment by ktoso
_Monday Apr 04, 2016 at 12:31 GMT_


This should actually not take more than a few lines, contributions are welcome!

Comment by TobiasPfeifer
_Sunday Jun 26, 2016 at 00:19 GMT_


I'd like to help implementing this feature.
I experimented around a bit but I'm not sure if I'm on the right track. I think I need some guidance with this one.
Here is what I did so far (see comments for open questions): 6e06049f2f2dbbadc0763fda0103119b1f98fba4

Comment by ktoso
_Monday Jun 27, 2016 at 08:49 GMT_


I added some comments, continue working on it and send in a PR and we'll discuss more then :)
Would indeed be a fun directive to have

This has an existing PR in https://github.com/akka/akka/pull/21185

for the record: closed existing PR in akka/akka#21185 and opened #324

It looks like this issue hasn't gotten much love lately.
Is there still a decent interest in this feature? I might have some time to contribute.

I think interest is definitely there, as people continue to implement simplified (and often not-very-correct) version of this ad-hoc -- having it built in would indeed be lovely, so please give it a look if you have the time!

Note though that perhaps you could look at https://github.com/akka/akka-http/pull/324 for inspiration and/or push it over the finish line -- either would be good

I used most of the logic from #324, but replaced the multiple different directives with one and a magnet. I think I've addressed all the outstanding comments that were on #324 and akka/akka#21185, but let me know if I've missed anything.

Was this page helpful?
0 / 5 - 0 ratings