Example 9835

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.black-and-white-tenement.com"
port: 443
protocol: "https"
}

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

# CORS policy
cors: {
enabled: true
origins: [
"https://clear-cut-jury.net"
"https://app.ecstatic-basket.info"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 86400
}

cache: {
enabled: false
ttl: 757
store: "memory"
}
}

See also