When defining an API through the UI, I can simply select the "Enable CORS" option and it adds OPTIONS methods and a number of header mappings.
How can I achieve