Repository navigation
Cloudflare Zero Trust and Authentication
comicsnow edited this page Oct 10, 2026
·
1 revision
Comics Now! is designed to run securely behind Cloudflare Zero Trust (Access). This eliminates the need to expose open ports or manage public passwords.
When a user visits your domain, Cloudflare Access validates their identity (via Google, GitHub, SAML, or one-time pin) and issues a signed JSON Web Token (JWT) in the request header:
Cf-Access-Jwt-Assertion: <signed-jwt-token>The Comics Now! origin server validates:
-
Algorithm Pinning: Strictly verifies
RS256signatures to prevent algorithm confusion attacks. -
JWKS Key Caching & Rate-Limiting: Retrieves public keys from
https://<CLOUDFLARE_TEAM_DOMAIN>/cdn-cgi/access/certswith a 1-hour in-memory cache and a rate limit of 10 requests/minute. -
Audience Verification: Validates that the JWT was generated specifically for your application AUD tag (
CLOUDFLARE_AUD). - User Creation: Automatically provisions the user in the SQLite database based on their Cloudflare email.
Add these to your .env or Docker environment:
CLOUDFLARE_TEAM_DOMAIN=myteam.cloudflareaccess.com
CLOUDFLARE_AUD=a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890To make administration seamless on your home network, Comics Now! includes socket-level private network auto-elevation:
- When accessed from a private LAN IP (e.g.
127.0.0.1,::1,192.168.x.x,10.x.x.x,172.16-31.x.x), the server inspectsreq.socket.remoteAddressdirectly. - LAN connections automatically authenticate as the primary
adminuser (default-user). -
Security Guard: External attackers attempting to spoof
X-Forwarded-Forfrom the internet cannot trigger LAN elevation because Comics Now! validates the physical network socket.
- Home
- What is Comics Now!?
- Installation & Deployment
- Cloudflare Zero Trust & Authentication
- User & Administrator Management
- Libraries, Folder Structures & Scanning
- Supported Formats & Metadata Storage
- The Tagging Engine & File Organization
- Smart Guided View & Reading Modes
- Reading Lists
- Devices, Progress Syncing & Offline PWA
- UI Navigation & Long-Press Menus
- Search, Filtering & Publisher Logos
- Model Context Protocol (MCP) Server
- System Logs & Maintenance
- REST API Reference