Repository navigation
feat: add origin-bound custom request headers - #2192
laugmanuel wants to merge 1 commit into
Conversation
Allow additional request headers, for example the credentials of a pre-authentication proxy - CustomHeaders is a process wide registry keyed by the normalized origin (lower case, internationalized hosts in punycode, default port omitted). Only https origins and valid header names and values are accepted; reserved names like Authorization, Cookie or Host are rejected. Origins can be unregistered again. - NextcloudClient and PlainClient add the headers through a network interceptor, so every hop of a redirect chain is checked and headers never follow a redirect to another origin. - OwnCloudClient applies the headers before each execution and redirect hop. Headers injected for the previous hop are removed, values set by the operation itself are restored. - The registry lives in memory; persisting and restoring the headers is up to the app. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Manuel Laug <laugmanuel@gmail.com>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Allow additional request headers, for example the credentials of a pre-authentication proxy
This fixes nextcloud/android#5821
🤖 AI (if applicable)