HTTP GET request changes into OPTIONS while adding headers in angular js
I have the same problem in Angular 4
HTTP GET request changes into OPTIONS while adding headers in angular js
I have the same problem in Angular 4
Its called CORS, it has nothing to do with angular. Read up on the CORS spec, specifically the bit about simple request.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
If you do not want the options pre flight request to be triggered you must not add custom headers.
Have a look at this for info in which headers are cors safe:
https://fetch.spec.whatwg.org/#cors-safelisted-request-header