Akka HTTP whitelist for incoming connections

Hi All,

Is there a conf for akka http server where which we can specify a list of domains a whitelist those requests would be only processed and other kicked out and not get a 200 status?

Cheers and thanks in advance
greyamigo

You can build this yourself rather easily, keep such set and compare on incoming request. It would be a directive you can “wrap” your others in

i was wondering if its is a configuration somewhere like

default-host-header

in https://doc.akka.io/docs/akka-http/current/configuration.html?language=scala . I was looking at a collector app (opensource prebuilt) which used an akka http server to recieve messages.

So to do this i have to go in their code base and introduce my if in List condition right ?

No such whitelist feature exists; yes, you’d have to either change their code or proxy it somehow.
I’m not familiar with the library you mention, so can’t advice more.

If they provide a route you could wrap it with yout logic.

You could alternatively setup such policy using firewalls or a reverse proxy in front of the app.