evert0n/koa-cors — pull request #15 by petuomin (2014-06-25 13:27:48+00:00)
Title: Handles options.origin as function

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.