Example 2634

API Gateway

API gateway routing and middleware configuration.

{
gateway: {
host: "api.essential-fellow.name"
port: 8443
protocol: "https"
}

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

# CORS policy
cors: {
enabled: true
origins: [
"https://good-natured-gastropod.com"
"https://app.noteworthy-cop-out.info"
]
methods: [
"GET"
"POST"
"PUT"
"DELETE"
]
max_age: 7200
}

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

See also