By engamr
hello
first: it is not repeat question about access allow origin let me explain
now I develop project I used for front End Angular js application
and for backed lravel 5.2 I already install cors origin allowed in my project beacase all data It’s transfer very good but when I uploade images using ajax and base64 return to me this message form my browser
XMLHttpRequest cannot load http://www.api.panakeias.com/updateTeacherpicprofile/9. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost’ is therefore not allowed access. The response had HTTP status code 500.
I deployed my two project on digital ocean LEMP Stake Ubuntu 16.04
forntend project on main domain and backend project on sub-domain
how can I fix this problem
thank’s
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If you are using Laravel 5.5 Check this tutorial for fixing Laravel access-control-allow-origin error. You don’t need to perform any special thing at angular js side. Just make few changes in Laravel as suggested in the tutorial. http://www.laravelinterviewquestions.com/2017/12/cross-origin-request-blocked-error-laravel.html Thanks Happy Coding !!!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.