Setup master url function copied to the network package