50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
_format_version: "3.0"
|
|
_transform: true
|
|
|
|
services:
|
|
- name: fastapi-svc
|
|
host: fastapi
|
|
port: 8000
|
|
protocol: http
|
|
|
|
routes:
|
|
- name: fastapi-api
|
|
paths: ["/api/"]
|
|
strip_path: true
|
|
methods: ["GET", "POST", "PUT", "PATCH", "DELETE"]
|
|
plugins:
|
|
- name: cors
|
|
config:
|
|
origins: ["*"]
|
|
methods: ["GET", "POST", "PUT", "PATCH", "DELETE"]
|
|
headers: ["Accept", "Content-Type", "Authorization"]
|
|
credentials: false
|
|
max_age: 3600
|
|
|
|
- name: fastapi-health
|
|
paths: ["/gateway-health", "/healthz"]
|
|
strip_path: true
|
|
methods: ["GET"]
|
|
|
|
- name: kong-meta
|
|
url: http://localhost:8001
|
|
routes:
|
|
- name: root-status
|
|
paths: ["/"]
|
|
strip_path: true
|
|
methods: ["GET"]
|
|
plugins:
|
|
- name: request-termination
|
|
config:
|
|
status_code: 200
|
|
content_type: application/json
|
|
body: '{"status":"Kong Gateway OK"}'
|
|
|
|
|
|
|
|
plugins:
|
|
- name: rate-limiting
|
|
config:
|
|
second: 25
|
|
policy: local
|