Why are you stripping the host/port again in Karma middleware?