Add custom HTTP header support for proxies#42
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. |
|
What's going on with this PR? Will it be merged soon? Our instance is using an auth proxy, so clients are not usable right now. This custom header implementation would work perfectly for us. |
|
@m8426 I'm curious what software you are using? I am on CF Access, and I'm looking into ways around this issue while being able to use the iOS app. Only thing I can think of is a user agent bypass, I'm wondering if there's any other way to sneak in a secret somehow |
|
yeah i did think of that, but we've just left it as is for now @tbsbdr @micbar @guruz @markrosan8 any idea what's going on with this pr? it looks very simple. im happy to help contribute to finish what's needed. let's push it through. |
|
@m8426 I think someone will have to take this and the mTLS stuff over, I'm not so interested in finishing it off anymore. Working with this team has been a pain. Supposedly they have a 10+ member team, but its taken months to get a response to the PR, and I still have no requirements for mergeability. How do you work with a month long delay between each response? I used the user agent bypass proposed by @edernunez61 , but I've just stopped using the ios app entirely now. Hope someone can get it done. Thanks. |
|
Most of the people here in iOS are community. We are thinking of giving more people write access. |
I agree it makes sense to have this, BUT: This PR is still not multi-account, while the client(s) are multi account. It does not make sense to send the same headers if you have multiple accounts configured. (Can even be a security risk if you accidently expose them to a second account) (One) idea to make this work was the discussion in https://github.com/orgs/opencloud-eu/discussions/2557#discussioncomment-16681031 .. Better ideas are welcome. In general, need to consider those things:
Only hack to get around this that I could imagine: Expose the setting like it is, BUT hide and disable it if (numberOfAccountsInApp>1). See also opencloud-eu/android#116 CC @paolostivanin |
I'll try to vibe coding something here based on @markrosan8 's PR here. I'll report back.. |
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: