Search Posts

Category: lumen

Deny all but only allow access from Angularjs on the same server

I have a Lumen backend and an Angularjs project on the same server without a virtual host. The way I access APIs is simply by the URL like www.example.com/api/public/get_some_data. I want to hide these endpoints from the public but only allow access from the Angularjs. I tried adding this to the .htaccess in the api/public folder, Order deny,allow Deny from all Allow from 127.0.0.1 But Angular will be denied as well. I access the endpoint […]