Example 16126

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.passionate-silk.com"
port: 443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "15m"
max_requests: 6810
by: "ip"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://straight-validity.net"
"https://app.blaring-role.net"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 3600
}

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

See also