Example 16238

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.noxious-best-seller.com"
port: 443
protocol: "https"
}

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

# CORS policy
cors: {
enabled: true
origins: [
"https://questionable-yogurt.net"
"https://app.improbable-sustenance.net"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 7200
}

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

See also