articulate / paperplane

Lighter-than-air node.js server framework
MIT License
134 stars 11 forks source link

Add CORS headers for error responses #21

Closed mgreystone closed 6 years ago

mgreystone commented 6 years ago

Paperplane currently does not add CORS headers if a handler throws. I have hacked together a solution by wrapping any errors in a CorsError object with headers, & unwrapping it in errors.js.

flintinatux commented 6 years ago

👀

mgreystone commented 6 years ago

@flintinatux You're code is much cleaner. My vote is that we just start there.

mgreystone commented 6 years ago

Closing in favor of #22