Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

engamr's avatar

No 'Access-Control-Allow-Origin' with laravel and angular js - not normal case

Hi I develop application and use this technology

I used Angular js for frontend application and for backend i used laravel 5.2, I already install cors origin allowed in my project because all data transfer very good, but when I upload images using ajax and base64, then I get this message from 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 Stack Ubuntu 16.04 frontend project is on main domain ,and backend project is on sub-domain.

0 likes
0 replies

Please or to participate in this conversation.