You should make it static and use the WorldContextObject to call GetWorld since you can’t make the call directly from a static function. Optionally use BlueprintPure instead of BlueprintCallable:
*.h
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContextObject"))
static const FString GetNetworkURL(UObject* WorldContextObject);
*.cpp
const FString UMyBlueprintFunctionLibrary::GetNetworkURL(UObject* WorldContextObject)
{
if (WorldContextObject)
{
if (UWorld* World = WorldContextObject->GetWorld())
{
return World->GetAddressURL();
}
}
return "";
}