Example 6127

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.winged-joy.com"
port: 8443
protocol: "https"
}

# Rate limiting
rate_limit: {
enabled: true
window: "15m"
max_requests: 2569
by: "user"
}

# CORS policy
cors: {
enabled: true
origins: [
"https://specific-dish.net"
"https://app.snoopy-avalanche.net"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 3600
}

cache: {
enabled: true
ttl: 1813
store: "redis"
}
}

See also