Flutter pub_hosted_url mirror sonatype nexus

996 Views Asked by At

I'm working in heavy secured company, the only possible way to reach pub.dev/packages is through nexus sonatype proxy, so I've set the pub_hosted_url to point nexus server, fetching versions working perfecty but after that pub trying downloading packages from archive url: https://pub.dartlang.org that is not reachable, temporary solution that I made is write simple server that redirect all request to nexus, override response by replace all https://pub.dartlang.org to nexus urls, is there any better solution to handle nexus proxy ?

1

There are 1 best solutions below

0
On

I think you can reverse the order, have nexus in front door, and your simple server as middle tier to bridge nexus and pub.dartlang.org