use request.protocol instead of hard coding "http"