We are trying to create Jenkins pipeline with gitea while we are trying to create webhook in the repository getting below error .
Delivery: Post "http://10.240.0.49:3000/gitea-webhook/post": dial tcp 10.240.0.49:3000: webhook can only call allowed HTTP servers (check your webhook.ALLOWED_HOST_LIST setting), deny '10.240.0.49(10.240.0.49:3000)'
If you can’t find it, you can use the find command to locate where the file is.
Once you’ve done this, you need to add a line called ALLOWED_HOST_LIST:
ini
[webhook]
ALLOWED_HOST_LIST =
You only need to add the IP address; the port is not required.
The second note is for when you are testing locally. If you implemented it using Docker, you need to check which port you exposed, and that port should be included in the webhook URL that add in gitea for webhook url. Additionally, ensure that the network is set to bridge with the IP you implemented (for example, Jenkins), as the default command sets the network to bridge.
To test if the webhook is working, go into the Gitea container and call the webhook URL.