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

[#715] Forward custom headers for cdx queries #813

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

krakan
Copy link
Contributor

@krakan krakan commented Feb 13, 2023

Description

Find custom http headers in the incoming request and forward them to the cdx-request. A custom header in this context is one prefixed with HTML_X_.

Motivation and Context

The difference between the block and exclude actions in the ACL is that the former should allow access to the index but not the data whereas the latter should block both index and data access.

See issue [#715] which is about allow_ignore_embargo not allowing access to the index when specified with a specific user. On investigation the issue also affected other use cases. The change set includes new tests for theses cases.

Types of changes

  • Replay fix (fixes a replay specific issue)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added or updated tests to cover my changes.
  • All new and existing tests passed.

In particular the X-Pywb-ACL-User header must be forwarded in order
for it to be able to control CDX-queries
@tw4l tw4l self-requested a review February 15, 2023 18:08
Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@tw4l tw4l merged commit 5c427b9 into webrecorder:main Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants