davidcastagnetoa/skills

nginx_lua

Reverse proxy de alto rendimiento con módulo Lua para lógica personalizada de gateway

First seen Mar 6, 2026

Installation

$ npx skills add davidcastagnetoa/skills --skill nginx_lua

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from davidcastagnetoa/skills · top by installs.

npx skills add davidcastagnetoa/skills

Browse all from davidcastagnetoa/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,077 B
  • docs SUMMARY.md 104 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 5 installs

SKILL.md

nginx_lua

Nginx con OpenResty (módulo LuaJIT integrado) actúa como API Gateway principal. Gestiona TLS termination, routing, rate limiting distribuido via Redis, y permite lógica personalizada en Lua sin recompilar Nginx.

When to use

Usar como punto de entrada único a todos los microservicios KYC. Todo el tráfico externo pasa por Nginx — nunca exponer los servicios FastAPI directamente a internet.

Instructions

  1. Usar imagen OpenResty: docker pull openresty/openresty:alpine
  2. Configuración base en nginx/conf/nginx.conf:

``nginx upstream kycapi { leastconn; server kyc-api-1:8000; server kyc-api-2:8000; keepalive 32; } server { listen 443 ssl http2; sslcertificate /etc/ssl/certs/kyc.crt; sslcertificatekey /etc/ssl/private/kyc.key; sslprotocols TLSv1.3; sslciphers TLSAES256GCMSHA384:TLSCHACHA20POLY1305SHA256; clientmaxbodysize 20M; # máximo payload (2 imágenes ~5MB c/u + overhead) location /v1/ { proxypass http://kycapi; proxyhttpversion 1.1; proxysetheader Connection ""; proxyread_timeout 30s; } } ``

  1. Añadir security headers en addheader block (ver skill securityheaders).
  2. Habilitar Gzip: gzip on; gziptypes application/json; gzipmin_length 1024;
  3. Configurar access log en formato JSON para ingesta por Promtail.
  4. Rate limiting con módulo limitreqzone + Redis via lua-resty-redis para contadores distribuidos.
  5. Healthcheck: location /health { return 200 "ok"; access_log off; }

Notes

  • OpenResty incluye LuaJIT — soporta hasta 50K req/s por instancia en hardware moderno.
  • Nunca exponer el puerto 8000 de FastAPI al exterior — solo el 443 de Nginx.
  • Rotar certificados TLS con cert-manager automáticamente — Nginx recarga con nginx -s reload.