fix: make Arcane reverse-proxy aware to resolve connection issues#2717
Merged
Conversation
Contributor
|
Container images for this PR have been built successfully!
Built from commit 0e5c58c |
474d33d to
2db7299
Compare
github-actions Bot
added a commit
to ShobuPrime/home-assistant-apps
that referenced
this pull request
May 26, 2026
## Arcane Docker Manager Update This automated PR updates Arcane from `1.19.4` to `1.19.5`. ### Changelog ### Bug fixes * improve environment proxy error handling ([#2649](getarcaneapp/arcane#2649) by `kmendell`) * align local BuildKit load/push exporter ([#2650](getarcaneapp/arcane#2650) by `kmendell`) * PUID and PGID being set on project subfolder on every startup ([#2656](getarcaneapp/arcane#2656) by `kmendell`) * system upgrade doesnt support non unix socket docker hosts ([#2651](getarcaneapp/arcane#2651) by `kmendell`) * resizing window discards edits in compose editors ([#2719](getarcaneapp/arcane#2719) by `kmendell`) * only validate project name if it has changed ([#2720](getarcaneapp/arcane#2720) by `kmendell`) * make Arcane reverse-proxy aware to resolve connection issues ([#2717](getarcaneapp/arcane#2717) by `kmendell`) * tolerate undefined typed env vars in GitOps sync ([#2721](https://github.com/getarcaneapp/arcane/pu ### Changes - Updated `config.yaml` version - Updated `build.yaml` ARCANE_VERSION - Updated `Dockerfile` ARCANE_VERSION - Updated documentation files - Updated CHANGELOG.md ### Release Notes Full release notes: https://github.com/getarcaneapp/arcane/releases/tag/v1.19.5 --- This PR was automatically generated by the Update Arcane workflow Auto-merged by GitHub Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Checklist
mainbranchWhat This PR Implements
Fixes: #2661
Changes Made
Testing Done
./scripts/development/dev.sh startjust lint all)just test backendAI Tool Used (if applicable)
AI Tool:
Assistance Level:
What AI helped with:
I reviewed and edited all AI-generated output:
I ran all required tests and manually verified changes:
Additional Context
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR makes Arcane reverse-proxy aware by introducing a
TRUSTED_PROXIES-gated middleware that propagates the HTTPS scheme decision via request context so cookie names (__Host-tokenvstoken),Secureflags, and clear directives all round-trip correctly through an HTTPS reverse proxy. It also adds a WebSocket ping/pong heartbeat to prevent idle connections from being silently dropped by upstream proxies.X-Forwarded-Protoinspection to a context key populated bysecureCookieContextMiddlewareInternal, which checks that the direct TCP peer falls withinTRUSTED_PROXIESbefore trusting the header — untrusted clients cannot spoof the flag.LISTENis bound to an explicit loopback IP literal,TRUSTED_PROXIESis auto-set to loopback CIDRs so the typical Caddy/Nginx/Traefik setup works without manual configuration.forwardAgentToClientnow sends a ping every 54 s and closes the stream if no pong arrives within 60 s, with properly scoped write deadlines (1 s for ping frames, 10 s for data frames).Confidence Score: 5/5
Safe to merge; the trust-gating logic correctly validates the TCP peer before honoring X-Forwarded-Proto, and both cookie set and clear paths now use consistent names for the secure context.
The core security property — that untrusted clients cannot force __Host-token / Secure cookies by forging X-Forwarded-Proto — is enforced at the middleware layer against req.RemoteAddr, which cannot be spoofed by application-level headers. Cookie name selection and clear directives are now symmetric. The only finding is a naming-convention nit on the new applyProxyDefaults helper.
No files require special attention beyond the minor naming convention issue in backend/internal/config/config.go.
Prompt To Fix All With AI
Reviews (3): Last reviewed commit: "fix: make Arcane reverse-proxy aware to ..." | Re-trigger Greptile
Context used: