I had a similar issue that was really a pain. I was getting an error because of the domain mismatch. I necessarily didn’t want to remove the domain parameter in the return response. I went ahead and create a certificate for the custom subdomain I wanted in my naming scheme. Update the dns records. Then I created a custom api domain name with the same subdomain and mapped it to the api I was having issues with. I hope this helps so you don’t have to remove the domain parameter because this does pose security risk.