Creating JSONP(adding) responses with Silex
This blog post was published more than one year ago and might be outdated!
· One min read
Recently I had the need to extend a Silex application to be able to return JSONP responses when needed. I was looking for a generic approach and came across a blog post by Raphael Stolt who solved the problem with a clever "after middleware". This is the code you need to add to your app.php file: