Example 2126

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.competent-knitting.net"
port: 8443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "5m"
max_requests: 1288
by: "user"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://thick-tuba.org"
"https://app.bony-iridescence.name"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 7200
}

cache: {
enabled: true
ttl: 1556
store: "memory"
}
}

See also