Fix http and api pattern match