The response to add CORS headers to
Optionalconfig: CorsConfig<unknown, unknown>Optional CORS configuration to use instead of defaults
OptionalrequestOrigin: string | nullThe origin from the incoming request
A new response with CORS headers added
Helper function to add CORS headers to any response
Preserves any existing CORS headers set by the handler - only adds default CORS headers if they are not already present.