Example 8840

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.jaunty-tuba.org"
port: 8443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "1m"
max_requests: 2202
by: "ip"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://meaty-unique.org"
"https://app.standard-jazz.org"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 3600
}

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

See also