37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
apisix:
|
|
id: "apisix-gateway"
|
|
|
|
deployment:
|
|
role: traditional
|
|
role_traditional:
|
|
config_provider: etcd
|
|
admin:
|
|
allow_admin:
|
|
- 0.0.0.0/0
|
|
admin_key:
|
|
- name: "admin"
|
|
key: edd1c9f034335f136f87ad84b625c8f1
|
|
role: admin
|
|
etcd:
|
|
host:
|
|
- "http://etcd:2379"
|
|
prefix: "/apisix"
|
|
|
|
nginx_config:
|
|
http_configuration_snippet: |
|
|
lua_shared_dict oauth_cache 1m;
|
|
map $http_cf_connecting_ip $client_ip_from_cf_or_xff {
|
|
default $http_cf_connecting_ip;
|
|
"" $http_x_forwarded_for;
|
|
}
|
|
map $client_ip_from_cf_or_xff $client_real_ip {
|
|
default $client_ip_from_cf_or_xff;
|
|
"" $remote_addr;
|
|
}
|
|
http:
|
|
access_log: "/dev/stdout"
|
|
access_log_format: '{"time_local":"$time_local","client_ip":"$client_real_ip","request":"$request","status":$status,"body_bytes_sent":$body_bytes_sent,"request_time":$request_time,"upstream_response_time":"$upstream_response_time"}'
|
|
access_log_format_escape: json
|
|
error_log: "/dev/stderr"
|
|
error_log_level: "warn"
|