put the logic for secure_get inside getNodeURL where it is used