Consolidar ejemplos de routers en middlewares.yml (fix error standalone http)

This commit is contained in:
2025-12-01 12:52:09 +01:00
parent 4e9a74850c
commit f3815ae8df
3 changed files with 56 additions and 52 deletions

View File

@@ -42,3 +42,57 @@ http:
regex: "^https?://www\\.(.+)"
replacement: "https://${1}"
permanent: true
# ============================================
# ROUTERS Y SERVICIOS (Ejemplos comentados)
# ============================================
# Descomentar y adaptar según necesites
# routers:
# # Ejemplo: Router para aplicación web con HTTPS y middlewares
# whoami:
# rule: "Host(`whoami.tudominio.com`)"
# entryPoints:
# - websecure
# middlewares:
# - security-headers
# - rate-limit
# service: whoami-service
# tls:
# certResolver: letsencrypt
#
# # Ejemplo: Router con autenticación básica y restricción IP
# admin-panel:
# rule: "Host(`admin.tudominio.com`)"
# entryPoints:
# - websecure
# middlewares:
# - auth-basic
# - ip-allowlist
# - security-headers
# service: admin-service
# tls:
# certResolver: letsencrypt
#
# services:
# # Ejemplo: Servicio apuntando a contenedor local
# whoami-service:
# loadBalancer:
# servers:
# - url: "http://whoami:80"
#
# # Ejemplo: Servicio apuntando a servidor externo
# admin-service:
# loadBalancer:
# servers:
# - url: "http://192.168.1.100:8080"
#
# # Ejemplo: Servicio con health check
# api-service:
# loadBalancer:
# servers:
# - url: "http://api:3000"
# healthCheck:
# path: "/health"
# interval: "10s"
# timeout: "3s"