Example 3528

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.coarse-skean.net"
port: 8443
protocol: "https"
}

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

# CORS policy
cors: {
enabled: true
origins: [
"https://sparse-festival.org"
"https://app.spherical-larva.org"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 3600
}

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

See also