change http:// to request:scheme() where appropriate so it will work with https