I have a hosted target, and I am trying to add CORS headers.
I added them according to this article:
https://docs.apigee.com/api-platform/develop/adding-cors-support-api-proxy#addingcorsheaderstoanexistingproxy and deployed, and the deploy was successful but CORS headers were not sent when trying it out.
I edited the add-cors policy from
<Header name="Access-Control-Allow-Origin">{request.header.origin}</Header>
to
<Header name="Access-Control-Allow-Origin">*</Header>
and while it saved, it would not deploy. I got a generic
Failed to deploy Hosted Function Invalid response returned from backend: failed to update deployment .
I changed it back to {request.header.origin} and I got the same error on deployment.
I’ve created a new hosted target, using the helloworld sample and clicking on “Add CORS” when the option presents itself, and it deploys initially, and then exhibits the same behavior if I try to edit the origins in the policy, or the allowed methods, even if I edit them back to the original value.