cretueusebiu / laravel-nuxt

A Laravel-Nuxt starter kit.
https://laravel-nuxt.cretueusebiu.com
MIT License
1.15k stars 262 forks source link

blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource #141

Closed maprangsoft closed 3 years ago

maprangsoft commented 3 years ago

i sent data to axios backend use dd($request->all()); when view in network tap in browser i can't see response from backend in console error blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

backend

Screen Shot 2564-01-17 at 15 06 51

send request

Screen Shot 2564-01-17 at 15 07 19

in network tap

Screen Shot 2564-01-17 at 15 08 07 Screen Shot 2564-01-17 at 15 08 16

please how to fix this problem i want see response from dd() in network tap preview.

cretueusebiu commented 3 years ago

Try this https://github.com/fruitcake/laravel-cors/issues/301#issuecomment-379894963

maprangsoft commented 3 years ago

thank you very much problem has resolved.

Screen Shot 2564-01-18 at 21 24 48