Example 10824

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.stale-sonata.name"
port: 443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "15m"
max_requests: 8135
by: "user"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://angelic-skyscraper.com"
"https://app.tense-cheetah.name"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 7200
}

cache: {
enabled: false
ttl: 603
store: "redis"
}
}

See also