loic-sharma / BaGet

A lightweight NuGet and symbol server
https://loic-sharma.github.io/BaGet/
MIT License
2.58k stars 644 forks source link

Cannot push a package when Baget placed behind Nginx #706

Closed ghost closed 2 years ago

ghost commented 2 years ago

Good day! I'm using BaGet 'v0.4.0-preview2'

when i try to do the command below i see Error 405 - Method not Allowed dotnet nuget push -s http://nuget.ourserver.com/nugetserver/nuget -k ourkey C:\nuget_packages\google.apis.1.55.0.nupkg

but when i do the following command - everything working fine: dotnet nuget push -s http://nuget.ourserver.com/v3/index.json -k ourkey C:\nuget_packages\google.apis.1.55.0.nupkg

I try to save oldnugetserver URL and want to forward all requests to the new one

Nginx config for oldnugetserver URL: location /nugetserver/nuget { proxy_pass http://localhost:5000/v3/index.json; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; allow 127.0.0.1; allow 192.168.100.0/23; deny all;

ghost commented 2 years ago

not actual anymore