Problem while Autoinstalling Ubuntu 22.04 using user_data rendered from foreman

Problem:
I am trying to autoinstall Ubuntu 22.04 here using user_data (cloud-config file) rendered from the foreman template. I am now having problem with telling the cloud-init to get the foreman template from my URL.

I am able to access the rendered template for the particular host at: https://<foreman_addr>/unattended/user_data?token=.

But when I pass this at the kexec with: ds=nocloud-net,s=<%= above_url %>. The cloud-init is expecting the meta-data and user-data from <%= above_url %>/meta-data and <%= above_url %>/user-data respectively. Any thoughts on how I can solve this problem.

Note that: I have developed my own proxy for the foreman.
Expected outcome:
To make the autoinstall work for multiple hosts with the same template.
Foreman and Proxy versions:
Foreman: 3.5.3
Proxy: foreman-custom-proxy (inhouse-proxy)
Foreman and Proxy plugin versions:

Distribution and version:

On a side note:
I am new here, so do let me know if any information is needed to solve this better.