pd4d10 / unpub

Self-hosted private Dart Pub server for Enterprise
https://pub.dev/packages/unpub
MIT License
441 stars 135 forks source link

Add reverse proxy deploy support, fixed issue #59 #60

Closed MegatronKing closed 2 years ago

MegatronKing commented 2 years ago

This commit provides two solutions. Config the nginx like this:

 location / {
    proxy_http_version 1.1;
    proxy_set_header proxy-origin https://pub.example.com/;
    proxy_pass http://localhost:4000/;
}

Another way, we can assign a proxy when starts the server:

unpub --proxy-origin https://pub.example.com