hi
i build a angulr 4 app and back with slim
i try to send a json to the angular but i get an error in angular:
Failed to load http://localhost/products/public/: The ‘Access-Control-Allow-Origin’ header has a value ‘http://localhost/products/public/’ that is not equal to the supplied origin. Origin ‘http://localhost:4200’ is therefore not allowed access.
I had same problem. I don’t know why if you add some url to Access-Control-Allow-Origin don’t work. Just add ‘*’ to get all urls work (not the best but works).