Forward client's user-agent instead of Node's #3152
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
Description
Forward the client's user-agent instead of Node's. Code by @mark-cooper in #2902 (comment).
Instructions for Reviewers
List of changes in this PR:
forward-client-ip
component to also forward the client's user-agent along with the client's IPNote: there was a small discussion about whether to rename the
forward-client-ip
component toforward-client-headers
and the consensus seemed to be that it was not important for 7.x and 8.x, but maybe we can do that for 9.0.Include guidance for how to test or review your PR.
To see the client headers you must look in the web server logs, which mean you must run the modified code on a server which has a full set up like Apache HTTPD or Nginx etc. Where before you would see Node.js's user-agent header, you should now see the actual user-agent of the client.
For example, when loading the home page in a web browser, the backend server / API logs used to show:
With this patch they should show:
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.