Refactor of CORS headers in filter - all working now!