Extract CORS support in dedicated class