Example 11528

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.medium-instructor.com"
port: 443
protocol: "https"
}

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

# CORS policy
cors: {
enabled: true
origins: [
"https://wasteful-settler.info"
"https://app.proud-hospitalization.com"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 86400
}

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

See also