Can you pull this into an enable_cors() function?