2 ms·
> This issue reached its pinnacle for us when we were unable to figure out how to replicate the magic response composition syntax used by Spray to abstract away
by leokun 13y ago
> This issue reached its pinnacle for us when we were unable to figure out how to replicate the magic response composition syntax used by Spray to abstract away the addition of CORS headers to HTTP responses.
I'd just put any kind of application, whether built in Scala, node.js or Go or ruby on rails behind a nginx proxy and use that for setting the headers. That simplifies a lot of things. I hope your HTTP headers aren't really so dynamic that you need to build software that changes them so much, especially not for a RESTful application.
- nl 13y agoSay you are building a redistributable app with Javascript clients. People will deploy in behind Ngnix, Apache, IISm ad sometimes with nothing at all. The last thing you want is to make the deployment harder.