(CORS) Cross origin issue with Laravel API


You might get a cross site origin error when trying to consume a web api which returns json data. This normally happens when your browser tries to make a request to an external site  / location.

A quick work around for this would be adding extra headers as shown in code below:


Comments

Popular posts from this blog

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

android build issue with version compatibility with agp and hilt : An exception occurred applying plugin request [id: 'com.google.dagger.hilt.android', version: '2.52']