If you are configuring repositories using a YAML file, you can use the downloadRedirect attribute.
For example, to configure a repository called generic-remote for direct download:
curl -u admin:password -X PATCH -H "Content-Type: application/yaml" "http://localhost:8080/artifactory/api/system/configuration" -T remote.yaml
where remote.yaml is:
remoteRepositories:
generic-remote:
downloadRedirect:
enabled: true