Update readme
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
nginx-data
|
||||
14
README.md
14
README.md
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user