Nginx Cache Proxy

Navigate to http://localhost:3000/ for interactive usage with URL builder.

Quick Start

# Build and run
./build.sh && docker-compose up

# Or run directly
docker run -p 3000:3000 docker.site.quack-lab.dev/nginx-cache-proxy:latest

Usage

# Proxy and cache any URL
curl "http://localhost:3000/?url=https://api.example.com/data"

# Skip cache for this request
curl -H "X-NoCache: 1" "http://localhost:3000/?url=https://api.example.com/data"

# Cache custom status codes (e.g., 400s)
curl -H "X-Status: 400" "http://localhost:3000/?url=https://api.example.com/bad"

# Purge cache for specific URL
curl "http://localhost:3000/purge/?url=https://api.example.com/data"

Features

  • Always caches 2xx status codes for 1 year
  • Cache size: 100GB max
  • Request size: 128MB max
  • X-Cache-Status header shows cache status
  • X-NoCache header bypasses cache
  • X-Status header caches custom status codes
  • Interactive web interface at root path
  • Cache purge endpoint
Description
No description provided
Readme 69 KiB
Languages
HTML 49.1%
Shell 42%
Dockerfile 8.9%