Skip to content

Add custom HTTP header support for proxies#42

Open
markrosan8 wants to merge 1 commit intoopencloud-eu:mainfrom
markrosan8:feature/custom-http-header
Open

Add custom HTTP header support for proxies#42
markrosan8 wants to merge 1 commit intoopencloud-eu:mainfrom
markrosan8:feature/custom-http-header

Conversation

@markrosan8
Copy link
Copy Markdown

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):

image image image

Types of changes

  • 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 code follows the code style of this project.
  • My change requires a change to the documentation.
  • Added an issue with details about all relevant changes in the docs repository.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have set a pull request label and a meaningful title for changelog automation

@markrosan8
Copy link
Copy Markdown
Author

If this is approved, I can submit similar PRs for the other clients as necessary.

@kulmann kulmann requested a review from guruz April 7, 2026 08:36
@markrosan8
Copy link
Copy Markdown
Author

@kulmann @guruz Hello, any updates on this?

@guruz
Copy link
Copy Markdown
Collaborator

guruz commented Apr 22, 2026

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 .
@micbar @butonic @rhafer ?

@guruz
Copy link
Copy Markdown
Collaborator

guruz commented Apr 22, 2026

By the way, in theory this should be a property of the account (since it's a multi account app) and not a global app setting!

Hmmmm. But that's harder to integrate UI wise.

@micbar @butonic @rhafer Can't this also be something the IDP tells the app?

@markrosan8
Copy link
Copy Markdown
Author

@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.

@markrosan8
Copy link
Copy Markdown
Author

It would be useful to note this restriction in the footer, if we choose to implement.

@guruz
Copy link
Copy Markdown
Collaborator

guruz commented Apr 22, 2026

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.

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