Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Serve non-html files from nginx (X-Accel-Redirect) #6404
Remove the "if" that checks if we are in community or commercial and always serve the files from storage (S3 on commercial). The URL generated will have an AccessKey and Expires arguments.
EDIT: this PR also returns a response with
Related to #6326 --we can probably merge both together.
This allows us to use Content-Disposition header with the proper filename on the response (including version slug on it). Besides, on corporate, this will allow us to serve non-html files without exposing the AccessKey and/or Expires and handle this internally.
ericholscher left a comment
This looks like a good approach to me. It requires some nginx changes on .org & .com, but it will make our UX around project downloads the same across both properties, which is really nice. It will let us serve the files directly from:
And they will have the proper