Provisioning with Smart-Proxy: Wrong preseed-URL

Problem:

I would like to use a smart proxy to deploy new servers using DHCP in a specific subnet. This works. Not fine, as the dhcp service has some hickups, but now it works.

The booted VM starts the debian installer, but fails to retrieve the preseed files:

Failed to retrieve the preconfiguration file
The file needed for preconfiguration could not be retrieved from http://foreman.example.org/unattended/provision?token=…-ce
cc-47f7-…-7252fa7350b8. The installation will proceed in non-automated

The problem is: Yes. This is surely the wrong URL. It should be foreman-proxy.example.org.

The generated Preseed default PXEGrub2 template simply contains the wrong information:

#
# This file was deployed via 'Preseed default PXEGrub2' template

set default=0
set timeout=10

menuentry 'Preseed default PXEGrub2' {
  linuxefi  boot/debian-mirror-QW1y4ZszpcLS-linux interface=auto url=http://foreman.example.org/unattended/provision?token=...-...-...-...-.... ramdisk_size=10800 root=/dev/rd/0 rw auto BOOTIF=01-00-50-56-85-de-1e auto=true netcfg/disable_dhcp=false locale=en_US hostname=test1.test.example.org domain=test.example.org
  initrdefi boot/debian-mirror-QW1y4ZszpcLS-initrd.gz
}

Expected outcome:

The hosts that are being provisioned in this subnet should have the foreman-proxy’s URL in their generated templates.

Foreman and Proxy versions:
3.11

Distribution and version:
Debian 12