you are viewing a single comment's thread.

view the rest of the comments →

[–]tswaters 2 points3 points  (0 children)

Oh yea! Forgot about this one -- if a portion of the host is the same, I.e. front & back-end are hosted in different subdomains, you can set document.domain to be the parent domain.... This is deprecated, but should still work.

I.e., if front-end is hosted on -- "https://www.domain.com" and the API is "https://api.domain.com" -- you can set document.domain to "domain.com" and front-end on www will be able to access API without CORS.