changing endpoint url to relative