remove trailing slash from endpoint