Closed petuomin closed 9 years ago
:+1: Although the documentation claims...
Can also be set to a function, which takes the request as the first parameter.
...it looks like this change is required to actually implement it.
Thanks and sorry it took long to look at it.
Thanks for merging
Makes it possible to pass a function as options.origin. The function gets request object as parameter and should return the string for 'Access-Control-Allow-Origin' header, or false to prevent the header from being set.
There is a simple example in the tests.