[container] Run a test (Tried with IP 172.17.0.1 as well)
root@c29483c2f844:/# curl -i host.docker.internal:12345/connector/status
curl: (7) Failed to connect to host.docker.internal port 12345 after 0 ms: Connection refused
Check docker container's host headers look ok by quitting yubihsm-connector on the host, starting an http listener on the host and running curl from container again.
GET / HTTP/1.1
Host: host.docker.internal:12345
User-Agent: curl/7.81.0
Accept: */*
HTTP/1.1 200 OK
Docker container can definitely contact the host, but it seems that the yubihsm-connector host header allowlist is not accepting `host.docker.internal` if the request comes from a container?
Test on host shows success
Start Docker container
[container] Install curl and check /etc/hosts in container to ensure that we can contact services running on the host
[container] Run a test (Tried with IP
172.17.0.1
as well)Check docker container's host headers look ok by quitting yubihsm-connector on the host, starting an http listener on the host and running curl from container again.
HTTP/1.1 200 OK