Adding CORS to Your BoxLang APIs

CORS, or Cross-Origin Resource Sharing, has been the bane of my existence at times. Don’t get me wrong, I get the idea behind it. I get why it’s necessary. That being said, I tend to forget about it until I write some client-side JavaScript code that gets hit by it. With that in mind, I thought I’d quickly demonstrate how to build CORS-enabled APIs with BoxLang. It’s incredibly simple, which is good, but you’ll want to keep it in mind when building out your own APIs.
What and Why?
I’m not going to repeat the full description of CORS available from MDN, but it basically boils down to a security feature in browsers. When executing code on your domain that makes... more →
Posted in: JavaScript