I’m trying to find a workaround for a webhook configuration where modifying the host header is not allowed.
Context:
I have a REST API datasource which is using an agent. I am trying to create a webhook which calls a POST endpoint using an IP address, but it requires the host header set to HOST_XXX (where XXX is a number). Since it is not allowed to modify the host header in the webhook configuration, I’m looking for alternative solutions.
What I’ve Tried:
I attempted the following workaround:
- Added an entry to
/etc/hostson the agent machine:
10.xxx.xxx.xx HOST_XXX
- Changed the webhook to call
HOST_XXXinstead of the IP address directly
The idea was that by using the domain name, the host header would automatically be set correctly.
The Problem:
I’m getting an “invalid domain” error with this approach.
Questions:
-
Seems like this error is caused by the underscore in the domain name (
HOST_XXX)? Would it be possible to allow the host with “_” if this is the right workaround? -
What’s the recommended workaround when you can’t modify the host header in webhook configurations?
Any guidance would be appreciated!