Skip to content

feat: fail on missing trusted proxy ips#1068

Merged
perber merged 1 commit into
mainfrom
feat/fail-on-missing-trusted-proxy-ips
May 29, 2026
Merged

feat: fail on missing trusted proxy ips#1068
perber merged 1 commit into
mainfrom
feat/fail-on-missing-trusted-proxy-ips

Conversation

@perber
Copy link
Copy Markdown
Owner

@perber perber commented May 29, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 29, 2026 14:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a fail-fast configuration check so reverse-proxy authentication via --enable-http-remote-user cannot be enabled without explicitly configuring trusted proxy IPs/CIDRs.

Changes:

  • Add validateHTTPRemoteUserConfig(...) and call it during startup.
  • Introduce unit tests for the new validation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
cmd/leafwiki/main.go Adds startup validation requiring --trusted-proxy-ips when HTTP remote-user auth is enabled.
cmd/leafwiki/main_test.go Adds a table-driven test for validateHTTPRemoteUserConfig.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/leafwiki/main.go
Comment thread cmd/leafwiki/main.go Outdated
Comment thread cmd/leafwiki/main_test.go
@perber perber force-pushed the feat/fail-on-missing-trusted-proxy-ips branch from cf12276 to 531a370 Compare May 29, 2026 15:10
@perber perber merged commit de5c2d1 into main May 29, 2026
8 checks passed
@perber perber deleted the feat/fail-on-missing-trusted-proxy-ips branch May 29, 2026 15:19
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