Skip to content

feat(server): proxy-aware hops and Secure cookies - #62

Merged
ArianAr merged 1 commit into
mainfrom
feat/39-proxy-aware-runtime
Jul 15, 2026
Merged

feat(server): proxy-aware hops and Secure cookies#62
ArianAr merged 1 commit into
mainfrom
feat/39-proxy-aware-runtime

Conversation

@ArianAr

@ArianAr ArianAr commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

Implements roadmap v1.3.7 / issue #39.

  • TRUSTED_PROXY_HOPS (default 1): rate-limit key from XFF Nth-from-right
  • 0 ignores XFF (all keys local)
  • Cookie Secure from COOKIE_SECURE or https:// public URL (else NODE_ENV)
  • Docs: README, deploy checklist, SECURITY, .env.example

Test plan

  • Unit tests for hops + cookie secure + client key
  • test + typecheck + lint

Closes #39

TRUSTED_PROXY_HOPS (default 1) picks the client from X-Forwarded-For
from the right. Unlock cookie Secure derives from PAPERCUT_PUBLIC_URL
or COOKIE_SECURE.

Closes #39
@ArianAr ArianAr added enhancement New feature or request security Security-related issue or fix (non-advisory tracking) area:server Next.js server / API labels Jul 15, 2026

@ArianAr ArianAr left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review

Summary: Correct spoof-resistant XFF handling (rightmost trusted hop). Cookie Secure derivation matches real reverse-proxy deploys. Tests cover defaults and edges.

Verdict: LGTM once CI green.

@ArianAr
ArianAr merged commit 205fa08 into main Jul 15, 2026
9 of 10 checks passed
@ArianAr
ArianAr deleted the feat/39-proxy-aware-runtime branch July 15, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:server Next.js server / API enhancement New feature or request security Security-related issue or fix (non-advisory tracking)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proxy-aware runtime: trusted hops, secure cookies, rate-limit keys

1 participant