Yes, Layer7 does support domain-based filtering - though it's a bit indirect.
You can enable reverse DNS lookups on the Listen Port by adding this in the Advanced tab:
Once that's set, you can use ${request.tcp.remoteHost} to get the hostname (instead of just the IP from ${request.tcp.remoteIP}). You can then do a domain match using a "Compare Expression" or custom logic.
That said - reverse DNS lookups can be slow or unreliable, especially in cloud-native environments. A cleaner and more predictable approach is to have clients pass their namespace, domain, or tenant ID in a custom HTTP header and validate that in the policy. Much simpler and aligns better with zero-trust/API gateway best practices.
Also, if your use case involves browsers or cross-origin traffic - Layer7 has native support for CORS via the Process CORS Request Assertion.
Docs:
Hope that helps!
Original Message:
Sent: Mar 06, 2025 10:40 AM
From: Sanjay Dalvi
Subject: Domain wide whitelisting
Dear All,
Anyone knowns whether Layer7 gateway has any inbuilt assertion or custom way of doing domain whitelisting. As IP trust is not a morden or cloud native way of security when mostly controlled on namespace.
Any lead is highly appriciated. Thank you.
------------------------------
[Application Architect]
[Cargill Incorporated]
[Singapore]
------------------------------