Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Jul 13, 2024
1 parent 8db3fdb commit 608a4c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
19 changes: 9 additions & 10 deletions apisix/cli/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ local _M = {
access_log = "logs/access.log",
access_log_buffer = 16384,
-- luacheck: push max code line length 300
access_log_format = '$remote_addr - $remote_user [$time_local] $http_host "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent" $upstream_addr $upstream_status $upstream_response_time "$upstream_scheme://$upstream_host$upstream_uri"',
access_log_format =
'$remote_addr - $remote_user [$time_local] $http_host "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent" $upstream_addr $upstream_status $upstream_response_time "$upstream_scheme://$upstream_host$upstream_uri"',
-- luacheck: pop
access_log_format_escape = "default",
keepalive_timeout = "60s",
Expand Down Expand Up @@ -332,15 +333,13 @@ local _M = {
},
admin = {
admin_key_required = true,
admin_key = { {
name = "admin",
key = "",
role = "admin"
}, {
name = "viewer",
key = "4054f7cf07e344346cd3f287985e76a2",
role = "viewer"
} },
admin_key = {
{
name = "admin",
key = "",
role = "admin"
}
},
enable_admin_cors = true,
allow_admin = { "127.0.0.0/24" },
admin_listen = {
Expand Down
8 changes: 4 additions & 4 deletions conf/config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,10 @@ deployment: # Deployment configurations
name: admin # admin: write access to configurations.
key: '' # Set API key for the admin of Admin API.
role: admin
-
name: viewer # viewer: read-only to configurations.
key: 4054f7cf07e344346cd3f287985e76a2 # Set API key for the viewer of Admin API.
role: viewer
# -
# name: viewer # viewer: read-only to configurations.
# key: 4054f7cf07e344346cd3f287985e76a2 # Set API key for the viewer of Admin API.
# role: viewer

enable_admin_cors: true # Enable Admin API CORS response header `Access-Control-Allow-Origin`.
allow_admin: # Limit Admin API access by IP addresses.
Expand Down

0 comments on commit 608a4c6

Please sign in to comment.