Let's think outside the box for a moment and consider a scenario where I am unable to modify HTTP headers or CORS settings.
This is merely a theoretical question.
Here's the situation:
- Suppose I have an application hosted on one domain, and I wish to send a POST request from another domain that I also own.
- Additionally, let's assume that I am restricted from adjusting CORS configurations
So, I can successfully make an ajax request from website.com
to app.website.com
. However, I have another website, website2.com
, which also wants to make an ajax request to app.website.com
If I were to create two CNAME records for app.website.com
so that app.website2.com
directs to the same application, would it be possible to perform ajax requests from either domain without the need for setting Access-Control
headers?
As far as I can see, the main concern would possibly involve an SEO penalty from search engines like Google due to the lack of a canonical URL for app.website.com. Nonetheless, in this thought experiment, it functions solely as an endpoint.
Can anyone shed some light on this situation?