Update readme

This commit is contained in:
2026-01-07 20:31:59 +01:00
parent 7de4d74fbf
commit 80d4edcf0b
3 changed files with 6 additions and 11 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
nginx-data

View File

@@ -23,17 +23,12 @@ The nginx configuration implements an inverted caching logic:
## Usage
Both URL formats are supported:
```bash
# Path-based URL format (recommended)
curl http://localhost:3001/https://api.example.com/data
# Query parameter format (legacy)
curl "http://localhost:3001/?url=https://api.example.com/data"
# Proxy a URL
curl "http://localhost:3000/?url=https://api.example.com/data"
# Enable caching with X-Cache header
curl -H "X-Cache: 1" http://localhost:3001/https://api.example.com/data
curl -H "X-Cache: 1" "http://localhost:3000/?url=https://api.example.com/data"
```
## Features
@@ -42,9 +37,8 @@ curl -H "X-Cache: 1" http://localhost:3001/https://api.example.com/data
- Cache zone: `api_cache` (10MB)
- Max cache size: 1GB
- Cache validity: 365 days for 200 responses
- Cache key: Based on scheme, host, URI, and query parameters
- Cache status header: `X-Cache-Status` shows cache hit/miss status
- Health endpoint: `GET /health` returns "healthy" for container health checks
- HTTPS support with proper SSL/TLS headers
## In n8n

View File

@@ -3,7 +3,7 @@ services:
# image: nginx:alpine
image: docker.site.quack-lab.dev/nginx-cache-proxy:latest
ports:
- "3001:3001"
- "3000:3000"
volumes:
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
- nginx-data:/etc/nginx/data