Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force using HTTPS every time for the Gallery #3795

Closed
agr opened this issue Apr 17, 2017 · 3 comments
Closed

Force using HTTPS every time for the Gallery #3795

agr opened this issue Apr 17, 2017 · 3 comments

Comments

@agr
Copy link
Contributor

agr commented Apr 17, 2017

The nuget.org web site uses HSTS, which presumes that only HTTPS should be used for visiting it, but it does not force HTTPS on the first visit. So if some browser was never used to access nuget.org, then first visit to http://nuget.org will not redirect to https://nuget.org. User would be able to download packages over plain HTTP which is not safe. Only authentication page currently forces HTTPS (and once you get there, you'd be unable to use HTTP again due to HSTS header, so no reason not to redirect to HTTPS for any HTTP request)

@skofman1
Copy link
Contributor

skofman1 commented May 8, 2017

@agr, please split this into an issue for gallery and an issue for search.

@skofman1
Copy link
Contributor

skofman1 commented May 8, 2017

Make sure this is configurable (external users shouldn't be forced to use https)

@agr agr self-assigned this May 16, 2017
@agr agr changed the title Force using HTTPS every time Force using HTTPS every time for the Gallery May 16, 2017
@agr
Copy link
Contributor Author

agr commented May 18, 2017

Copied from the ServerCommon#45

Some statistics:
We are getting 2-2.5 million requests over HTTP per day (not HTTPS). Almost all of them are GET requests and will be properly redirected. Also, there are ~5K HEAD requests that also would be properly redirected.

We are getting about 10K POST requests per day, most of the are $batch OData requests from a single IP address that result in HTTP 301, because they are made to nuget.org (and get redirected to www.nuget.org), seems to be not properly processed by whoever sends them. We also get about 20-25 legit POST requests (that result in 2xx response). These would start to produce errors, so clients would have to switch to HTTPS.

We also get the DELETE, OPTIONS, PROPFIND, PUT and TRACE requests, usually less than 10 per day. Most of them either result in 404, or produce the same response as GET, so we can ignore them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants