Example 1922

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.petty-lifestyle.com"
port: 8443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "5m"
max_requests: 4907
by: "user"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://heavy-knuckle.net"
"https://app.insidious-providence.name"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 86400
}

cache: {
enabled: true
ttl: 2670
store: "redis"
}
}

See also