I saw that someone used $ http.defaults.useXDomain = true in angular when working with CORS. Is it really necessary to do this?
I just installed laravel and angular in different domains (for different domain, I mean that I put angular and laravel in a completely separate folder in localhost www folder. FYI I use nginx). I hit the laravel controller with the http request from angular. It just works fine, I use $ http.defaults.useXDomain or not.
Fortunately, this condition facilitates my work. but I'm still wondering if there is an explanation why this happened?
source share