Example 8431

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.greedy-pomelo.com"
port: 443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "1m"
max_requests: 6335
by: "ip"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://watery-final.com"
"https://app.improbable-scenario.info"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 3600
}

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

See also