Example 13339

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.partial-wear.biz"
port: 443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "1m"
max_requests: 5002
by: "api_key"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://enchanting-quit.biz"
"https://app.young-bowler.org"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 86400
}

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

See also