Example 7127

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.gruesome-hamburger.name"
port: 8443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "15m"
max_requests: 206
by: "api_key"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://mediocre-individual.com"
"https://app.circular-runway.org"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 3600
}

cache: {
enabled: true
ttl: 1597
store: "memory"
}
}

See also