Cordova CORS-CORB over laravel api server
Weird thing happens to me when Postman seem to be working fine but cordova browser says CORS.
Tried using dd() just weird why Postman is working fine when the app isn't. dd() did not write proper response header (access-control-allow-origin not showing).
What i learn is that Chrome require header response with Access-Control-Allow-Origin but Postman did not.
This findings really took me a lot of hours to realize what is going on. I came to realize when i start to inspect the response header.
Earlier I thought that the app is broken, but when I put other url on the same code, it's working just fine.
lesson learned Chrome really hates Cross-Origin-Resource-Sharing (also tested with other web browser)
Tried using dd() just weird why Postman is working fine when the app isn't. dd() did not write proper response header (access-control-allow-origin not showing).
What i learn is that Chrome require header response with Access-Control-Allow-Origin but Postman did not.
This findings really took me a lot of hours to realize what is going on. I came to realize when i start to inspect the response header.
Earlier I thought that the app is broken, but when I put other url on the same code, it's working just fine.
lesson learned Chrome really hates Cross-Origin-Resource-Sharing (also tested with other web browser)
Comments
Post a Comment