Example 6627

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.aggressive-soybean.com"
port: 443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "5m"
max_requests: 5618
by: "api_key"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://unrealistic-account.net"
"https://app.handsome-eggplant.com"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 7200
}

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

See also