Given a CORS config and an incoming request, return whether it's allowed
and the response headers to send.
Config: { origins: string[] | '*', methods: string[], headers: string[] }.
Request: { origin, method, headers }.
Returns { allowed, responseHeaders }. If origin matches '*' or is inorigins, method is in methods, and every requested header is in
allowed headers (case-insensitive), it's allowed.
Sample tests