One of the projects I am working on is using a combination of Angular and Laravel. Angular is the driver for everything and controls the front end. Laravel provides an API to present date to the front end.
To help ease the worry of dealing with cross-site requests we decided to put the Laravel code base under the alias
/api. If we put this in an example, our website lives at
http://example.com/ and our API lives at
http://example.com/api/. When trying this on our Nginx server we ran into a problem, so I thought I would share the solution.