Implemented contentType exceptions array to resolve issues with static resources, such as pdf.