Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
From our discussion, you would like to add a custom Response Header in AFD dynamically based on the value of another custom Response Header from the Origin.
Unfortunately, this feature is only available in Azure Verizon Premium CDN as of now.
The document you have shared also references the same. I did a lab and I was able to get this working.
Currently, AFD server variables don’t support header.
Refer to this for supported server variables in AFD
You can consider using CDN in case you would want to dynamically update a custom header.
Additionally, you can raise this in Azure Feedback Hub
This site is closely monitored by our internal teams that are responsible for building Azure and they will consider this feature in the future releases.
Please let me know if you require additional information, I shall try to address them to the best of my knowledge.
Thanks,
Kapil
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.