I am working on a service that is consumed through AJAX from another domain.
I have domainA (the main domain where the service is hosted) and domainB which is A record pointing to a domainA.
The AJAX calls are working fine on domainA. Obviously no CORS headers are required.
On domainB the AJAX is failing because OPTIONS (Preflight) requests are not responding with the appropriate headers. I added the headers and the allowed origin domain but I found out that the request is not even reaching the server. I added logs for all incoming requests and none of them is OPTIONS.
I am not sure why the request is not proxied to the server.
I’d appreciate any directions.