Example 14330

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.elementary-lamp.name"
port: 443
protocol: "https"
}

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

# CORS policy
cors: {
enabled: true
origins: [
"https://superficial-widow.com"
"https://app.eminent-reporter.biz"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 3600
}

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

See also