Example 9634

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.competent-disclosure.name"
port: 8443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "1m"
max_requests: 1339
by: "api_key"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://sorrowful-ecliptic.com"
"https://app.subdued-brush.biz"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 7200
}

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

See also