Update cowboy middleware env tuple

- follow the new env tuple standard for middleware