Example 5722

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.blaring-custom.org"
port: 443
protocol: "https"
}

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

# CORS policy
cors: {
enabled: true
origins: [
"https://grumpy-providence.biz"
"https://app.smooth-amnesty.net"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 7200
}

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

See also