-
Notifications
You must be signed in to change notification settings - Fork 129
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
Make allow-directory-listing and provide-index-page compatible #139
Conversation
Thank you @AyodeAwe for your contribution. Unfortunately, I cannot accept contributions that retain their NVIDIA copyright. Honestly, I am disappointed about that, and I don't like this copyright game we are all stuck in, yet I've got to follow our policy. We also could try to set up a company-to-company contributor agreement, but that's a lot of work for a few number of changes. Perhaps, this PR can inspire another person to draft their own set of changes without a copyright attached. Seriously, myself and the NGINX crew are quite grateful for the contributions. By any chance, do you work with @indianwhocodes or @KodyKantor ? Kindly, By the way are you working with |
Hey @dekobon I received permission to remove the copyright headers, so I have added a commit to that effect. To answer your question, I don't recall having worked with either of the persons you mentioned. |
Wow, thank you! I will work on the next steps for getting this merged. |
@dekobon, just checking in. any updates here? |
I've started to review this PR and I'm concerned that the automated tests are failing. I've yet to get enough focus time to determine why they are failing, so if @AyodeAwe or @ajschmidt8 can do this, it would be quite helpful in moving this PR forward. |
@dekobon The issue with the failing automated tests should be fixed now. Kindly re-approve workflow. |
b067dab
to
55a69c6
Compare
55a69c6
to
413453c
Compare
Just rebased this PR on top of the latest remote commit (af0b2e9). Might need a workflow re-run to see if any errors still come up. |
cc: @dekobon ^^ |
It looks like the tests are now failing after rebasing. I'll be out of town next week, so I will not be able to make progress. If anyone wants to jump in and offer a fix, that would be appreciated. |
Fixed and tested locally. Kindly approve workflow run @dekobon |
Just checking on this PR @dekobon. Happy to help if any more work can be done to help move this PR forward. |
Right now, I'm working on testing. I've got the PR merged with latest master and it is passing all the tests on my test system. It is just a manner of me getting a solid chunk of time to go through it.
My apologies for the delay.
|
Hi @AyodeAwe I've made some modifications to the code for this PR (squashing and making a docs change). I've pushed it to: https://github.com/dekobon/nginx-s3-gateway/tree/render-static-index I would really like to keep the conversation history for this PR in a single place. Would you mind pulling this changes and force pushing them over the branch you have associated with for this PR? Next, I have an ask regarding the commit titled "allow HEAD requests." Can we either:
If I recall correctly, we do not support subdirectories because I wasn't able (or didn't have the time) to get them to return without doing a 404. Lastly, I have one more question. Did you test these changes with the v2 signatures enabled? |
a1c59a0
to
792d2cf
Compare
Ok. I’ve pulled in your changes and removed the Regarding testing with v2, it looks like Signature Version 2 is being turned off (deprecated) by AWS so all requests are naturally now failing. See warning note here. |
cc: @dekobon ^^ |
Note @dekobon the The failing test is this line (fails when HEAD requests are made to the root If we must have this case (specifically root directory HEAD requests - as other requests in that case assert correctly) pass (even though it is testing with the now deprecated v2 signature), we may need to update the Thoughts? |
Hi @AyodeAwe, my apologies for misunderstanding how the Just as you say, changing s3gateway.js:323 to: if (isDirectoryListing && (r.method === 'GET' || r.method === 'HEAD')) { makes the tests pass. I think if we add, we will be good to go. Thank you for bearing with me on this. As for v2 signatures, if it passes the integration tests, I think that is good enough for now. I do not want to deprecate v2 signatures because I've found that many non-AWS S3 interfaces use them exclusively. |
Thank you @dekobon, the commit has been re-added. |
This PR follows the discussion that happened in this issue.
The PR enables automatic static
index.html
rendering alongside the existing directory listing functionality provided by the library.Changes:
index.html
page. If this page is found, it is rendered, otherwise a simple directory listing is done.PROVIDE_INDEX_PAGE
variable is set to true.Note: Due to being an NVIDIA employee I am supposed to request files I modify have an NVIDIA copyright - this explains the included copyright headers.