Fix iteration of request headers
Allow passing config in to server constructor