EZP-21118: Moved most stuff to CorsListener