Skip to content

Instantly share code, notes, and snippets.

@tuannguyenssu tuannguyenssu/kong.yml Secret
Created Nov 10, 2019

Embed
What would you like to do?
_format_version: "1.1"
# Ví dụ cấu hình các plugins liên quan đến bảo mật được hỗ trợ bởi Kong
# Cấu hình các Consumers và JWT cho consumers
consumers:
- custom_id: tuannguyen
username: tuannguyen
jwt_secrets:
- consumer: tuannguyen
algorithm: HS256
key: 0pOR32s8ycLbUdVu7uLRP2HhIDP6n2eE
secret: pyk8mCpScq6YmndVxEnzdYgLtg5H7E7Y
plugins:
- name: jwt
enabled: yes
service: default-service
config:
header_names: ["Authorization"]
uri_param_names:
key_claim_name: iss
run_on_preflight: true
# Cấu hình các Upstreams
upstreams:
- name: default-upstream
hash_on: none
algorithm: round-robin
tags:
hash_fallback: none
hash_on_cookie_path: "/"
healthchecks:
active:
unhealthy:
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
tcp_failures: 0
timeouts: 0
http_failures: 0
interval: 0
type: https
http_path: "/"
timeout: 1
healthy:
successes: 0
interval: 0
http_statuses:
- 200
- 302
https_verify_certificate: true
concurrency: 10
passive:
unhealthy:
http_failures: 0
http_statuses:
- 429
- 500
- 503
tcp_failures: 0
timeouts: 0
healthy:
http_statuses:
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 226
- 300
- 301
- 302
- 303
- 304
- 305
- 306
- 307
- 308
successes: 0
type: https
slots: 200
targets:
- target: reqres.in:443
weight: 200
# Cấu hình các Services và Routes
services:
- name: default-service
host: default-upstream
# url : http://reqres.in
connect_timeout: 60000
protocol: https
read_timeout: 60000
port: 443
path: "/"
retries: 5
write_timeout: 60000
routes:
- name: default-route
methods:
- GET
paths:
- /api/users
protocols:
- http
- https
regex_priority: 0
strip_path: false
preserve_host: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.