Ignore specific url parameters when following location headers #3856
+79
−11
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.
Changes
Before, when a sessionid was present in the URL parameters, the location header would also have this sessionid, and the database would blow up with URLs. This code strips certain params from the URL based on the Answer of a Question OOI. Also, some general fixes for questions are present.
Issue link
Closes #3207
Closes #3849
Closes #3848
Demo
The answer of this question:
Makes this config:
And when this Location header is present:
The sessionid will be stripped so that only this URL is created:
QA notes
Answer the question about oois-in-headers. Find Location headers that have one of the params from the question in them. See that the URLs that are created do not have those params.
Code Checklist
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.