Foreman-content-proxy userdata

Hi,

I am currently using:
Foreman: 3.3.0
Katello: 4.5.0

I have a foreman + katello (on Cloud infra) installation and a foreman-content-proxy (On site). When provisioning a Ubuntu desktop I’m using the foreman-content-proxy as the templates proxy and I’ve setup my configuration to point to the foreman-content-proxy using http://:8000/userdata.

When my machine tries to get the userdata it fails with 500 Internal Error.

On the foreman-katello server the following:
curl -D - http://8000/userdata/meta-data
it completes ok with HTTP 200

But if I try the same on the foreman-content-proxy I see:
HTTP/1.1 500 Internal Server Error
Failed to retrieve meta-data userdata template for {“kind”=>“meta-data”}: Error retrieving userdata/meta-data for {“url”=>“http://:8000”} from : Net::HTTPNotFound

Any idea where I am going wrong?

Many Thanks,
Tania

In the production logs I see:

Started GET “/userdata/meta-data?url=http%3A%2F%2Fforemanproxy%3A8000” for at
Processing by UserdataController#metadata as TEXT
Parameters: {“url”=>“http://foremanproxy:8000”, “userdatum”=>{}}
Could not find host for request
Rendering text template
Rendered text template (Duration: 0.0ms | Allocations: 2)

On the main server I’ve run foreman-installer --foreman-trusted-proxies “127.0.0.1” --foreman-trusted-proxies “::1” --foreman-trusted-proxies “”

I’ve also ensured templates is enabled for both proxies.

Any ideas any one?

Many Thanks,
Tania