• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

karanshukla / totalwarhammer-tournament-app / 32607678637
97%

Build:
DEFAULT BRANCH: main
Ran 23 Aug 2026 12:23AM UTC
Jobs 2
Files 165
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Aug 2026 12:22AM UTC coverage: 96.698% (+0.02%) from 96.676%
32607678637

push

github

karanshukla
fix(server): restore session cookies behind the Caddy proxy

Login has been broken in production since ddc65d7 shipped on 2026-08-19.
That commit changed the session cookie's `secure` from `"auto"` to
`isProduction`, and the two are not equivalent. With `"auto"`,
express-session resolves the flag from the forwarded scheme and still
sends the cookie; with a hard `true` it takes an early return and emits
no Set-Cookie at all when the scheme isn't https, logging nothing.

The scheme isn't https at Node. Railway terminates TLS at its edge and
Caddy listens on plain HTTP with auto_https off, so Caddy reports
X-Forwarded-Proto: http unless the hop it received the request from is a
trusted proxy — and Railway's edge is not one. ddc65d7's own message
records the same broken chain for the other header ("the socket rate
limiter keying on the proxy IP, one shared 20/min bucket for all users
behind Caddy").

The result was a login that succeeded server-side and then 401'd on
every request after it. Reproduced against production: POST /guest
returns 200 with a saved session and no Set-Cookie, and the deploy logs
pair "PKCE token exchange successful" with "authenticateSession: 401"
in the same second. Existing cookies masked it for three days, until the
UA-fingerprint check (also ddc65d7) evicted the last surviving session.

Fixed at the proxy, which is the layer that was actually wrong: all
three reverse_proxy blocks now forward the real scheme. The public
origin is https-only, so this states a fact rather than papering over
one.

`secure` goes back to `"auto"` as a second line of defence. A proxy that
misreports the scheme should cost the Secure flag, not every session in
the deployment, and the failure should be loud — so
warnOnInsecureForwardedScheme reports the first production request whose
forwarded scheme isn't https instead of leaving it to be inferred from
users being logged out.

Verified: caddy validate passes and the adapted JSON sets
X-Forwarded-Proto... (continued)

2787 of 2940 branches covered (94.8%)

Branch coverage included in aggregate %.

40 of 40 new or added lines in 1 file covered. (100.0%)

8692 of 8931 relevant lines covered (97.32%)

23.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 client - 32607678637.1 23 Aug 2026 12:26AM UTC 117
97.33
GitHub Action Run
2 server - 32607678637.2 23 Aug 2026 12:23AM UTC 48
96.38
GitHub Action Run
Source Files on build 32607678637
  • Tree
  • List 165
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #32607678637
  • 48e5d1b9 on github
  • Prev Build on main (#32599958891)
  • Next Build on main (#32610079490)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc