Add custom HTTP header support for proxies#42
Add custom HTTP header support for proxies#42markrosan8 wants to merge 1 commit intoopencloud-eu:mainfrom
Conversation
|
If this is approved, I can submit similar PRs for the other clients as necessary. |
|
Thank you for the PR. I have no opinion on this yet (and of course we could merge it if the code is OK) but I'd want to know what others think (that have more clue than me) about the general idea of having https://github.com/orgs/opencloud-eu/discussions/2557 . |
|
@guruz thanks for taking a look. You’re right in theory this should be account level, and I did in fact consider that when writing. But it would have been more complex, for what I saw to be minimal benefit. I assume the number of people using edge auth on two accounts simultaneously is very low (probably the number of people using two opencloud accounts itself is low). And either way, no one is able to use edge auth with iOS currently. So it’s not a regression in my view. But, let me know your thoughts. |
|
It would be useful to note this restriction in the footer, if we choose to implement. |
|
I have an idea for an UI that would help both you and @paolostivanin .. I'll post it to https://github.com/orgs/opencloud-eu/discussions/2557 tomorrow. |
Description
Adds a "Custom HTTP Header" settings section in the Settings page with two text fields for a header name and value. Values are saved to UserDefaults.standard and read by the SDK's prepareRequestForScheduling: to attach the header to every outgoing request.
Companion PR: opencloud-eu/ios-sdk#6
Related Issue
Resolves https://github.com/orgs/opencloud-eu/discussions/2557
Motivation and Context
Users running OpenCloud behind reverse proxies sometimes need a custom HTTP header on all requests for routing or authentication gating. The iOS app currently has no way to attach custom headers, which can prevent the app from working in these deployments.
How Has This Been Tested?
Built and tested on iOS sim. Verified via Traefik access logs that the custom header appears on all outgoing requests. Verified that leaving the fields empty results in no change to existing behavior.
Screenshots (if appropriate):
Types of changes
Checklist: