routes: - uri: /api/v1/auth/* name: auth-service upstream: type: roundrobin nodes: backend:8000: 1 plugins: cors: allow_origins: "*" allow_methods: "GET,POST,PUT,DELETE,OPTIONS" allow_headers: "*" expose_headers: "*" limit-req: rate: 10 burst: 20 rejected_code: 429 request-id: header_name: "X-Request-Id" include_in_response: true - uri: /api/v1/users/* name: user-service upstream: type: roundrobin nodes: backend:8000: 1 plugins: jwt-auth: key: "user-key" secret: "my-secret-key" cors: allow_origins: "*" allow_methods: "GET,POST,PUT,DELETE,OPTIONS" allow_headers: "*" expose_headers: "*" limit-req: rate: 100 burst: 50 rejected_code: 429 - uri: /api/v1/applications/* name: application-service upstream: type: roundrobin nodes: backend:8000: 1 plugins: jwt-auth: key: "user-key" secret: "my-secret-key" cors: allow_origins: "*" allow_methods: "GET,POST,PUT,DELETE,OPTIONS" allow_headers: "*" expose_headers: "*" limit-req: rate: 50 burst: 25 rejected_code: 429 - uri: /api/v1/admin/* name: admin-service upstream: type: roundrobin nodes: backend:8000: 1 plugins: jwt-auth: key: "admin-key" secret: "admin-secret-key" ip-restriction: whitelist: - 10.0.0.0/8 - 172.16.0.0/12 - 192.168.0.0/16 cors: allow_origins: "*" allow_methods: "GET,POST,PUT,DELETE,OPTIONS" allow_headers: "*" expose_headers: "*" limit-req: rate: 200 burst: 100 rejected_code: 429 - uri: /health name: health-check upstream: type: roundrobin nodes: backend:8000: 1 plugins: limit-req: rate: 1000 burst: 500 - uri: /* name: frontend upstream: type: roundrobin nodes: frontend:80: 1 plugins: proxy-cache: cache_zone: name: disk_cache_one memory_size: 50m disk_size: 1G disk_path: "/tmp/disk_cache" cache_method: - GET - HEAD cache_http_status: - 200 - 301 - 404 cache_ttl: 300 hide_cache_headers: true