Updated Module.php to check if the request is of type HTTP before detaching strategies from event manager