This is an automated email from the ASF dual-hosted git repository. spacewander pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push: new 3c01db5 chore: spelling (#3012) 3c01db5 is described below commit 3c01db5ef02964deeb0d5ecd55d07bcd27183858 Author: John Bampton <jbamp...@users.noreply.github.com> AuthorDate: Sun Dec 13 02:04:48 2020 +1000 chore: spelling (#3012) Co-authored-by: 罗泽轩 <spacewander...@gmail.com> Co-authored-by: YuanSheng Wang <membp...@gmail.com> --- apisix/core/config_etcd.lua | 2 +- apisix/core/config_yaml.lua | 2 +- apisix/core/response.lua | 2 +- apisix/plugins/api-breaker.lua | 2 +- apisix/plugins/cors.lua | 8 ++++---- apisix/plugins/prometheus/exporter.lua | 2 +- apisix/utils/batch-processor.lua | 2 +- conf/config-default.yaml | 6 +++--- doc/README.md | 4 ++-- doc/aws.md | 2 +- doc/discovery.md | 4 ++-- doc/how-to-build.md | 2 +- doc/install-dependencies.md | 2 +- doc/plugins/authz-keycloak.md | 2 +- doc/plugins/batch-requests.md | 4 ++-- doc/plugins/fault-injection.md | 2 +- doc/plugins/grpc-transcode.md | 2 +- doc/plugins/kafka-logger.md | 2 +- doc/plugins/mqtt-proxy.md | 2 +- doc/plugins/referer-restriction.md | 2 +- doc/plugins/response-rewrite.md | 2 +- doc/plugins/skywalking.md | 2 +- doc/plugins/sls-logger.md | 4 ++-- doc/plugins/tcp-logger.md | 2 +- doc/plugins/zipkin.md | 2 +- doc/zh-cn/discovery.md | 4 ++-- t/plugin/http-logger.t | 2 +- 27 files changed, 37 insertions(+), 37 deletions(-) diff --git a/apisix/core/config_etcd.lua b/apisix/core/config_etcd.lua index a38b204..1434157 100644 --- a/apisix/core/config_etcd.lua +++ b/apisix/core/config_etcd.lua @@ -477,7 +477,7 @@ end function _M.getkey(self, key) if not self.running then - return nil, "stoped" + return nil, "stopped" end return getkey(self.etcd_cli, key) diff --git a/apisix/core/config_yaml.lua b/apisix/core/config_yaml.lua index 733761f..e10aa06 100644 --- a/apisix/core/config_yaml.lua +++ b/apisix/core/config_yaml.lua @@ -189,7 +189,7 @@ local function sync_data(self) data_valid = false log.error("invalid item data of [", self.key .. "/" .. id, "], val: ", json.delay_encode(item), - ", it shoud be a object") + ", it should be a object") end local key = item.id or "arr_" .. i diff --git a/apisix/core/response.lua b/apisix/core/response.lua index 3297c34..92cd069 100644 --- a/apisix/core/response.lua +++ b/apisix/core/response.lua @@ -135,7 +135,7 @@ end function _M.get_upstream_status(ctx) - -- $upstream_status maybe including mutiple status, only need the last one + -- $upstream_status maybe including multiple status, only need the last one return tonumber(str_sub(ctx.var.upstream_status or "", -3)) end diff --git a/apisix/plugins/api-breaker.lua b/apisix/plugins/api-breaker.lua index f144a06..ec2f567 100644 --- a/apisix/plugins/api-breaker.lua +++ b/apisix/plugins/api-breaker.lua @@ -224,7 +224,7 @@ function _M.log(conf, ctx) -- clear related status if healthy_count >= conf.healthy.successes then -- stat change to normal - core.log.info("chagne to normal, ", healthy_key, " ", healthy_count) + core.log.info("change to normal, ", healthy_key, " ", healthy_count) shared_buffer:delete(gen_lasttime_key(ctx)) shared_buffer:delete(unhealthy_key) shared_buffer:delete(healthy_key) diff --git a/apisix/plugins/cors.lua b/apisix/plugins/cors.lua index e4cdbd3..fc90dc1 100644 --- a/apisix/plugins/cors.lua +++ b/apisix/plugins/cors.lua @@ -69,7 +69,7 @@ local schema = { }, allow_credential = { description = - "allow client append crendential. according to CORS specification," .. + "allow client append credential. according to CORS specification," .. "if you set this option to 'true', you can not use '*' for other options.", type = "boolean", default = false @@ -85,7 +85,7 @@ local _M = { } -local function create_mutiple_origin_cache(conf) +local function create_multiple_origin_cache(conf) if not str_find(conf.allow_origins, ",") then return nil end @@ -166,9 +166,9 @@ function _M.header_filter(conf, ctx) allow_origins = req_origin or '*' end local multiple_origin, err = core.lrucache.plugin_ctx(lrucache, ctx, nil, - create_mutiple_origin_cache, conf) + create_multiple_origin_cache, conf) if err then - return 500, {message = "get mutiple origin cache failed: " .. err} + return 500, {message = "get multiple origin cache failed: " .. err} end if multiple_origin then diff --git a/apisix/plugins/prometheus/exporter.lua b/apisix/plugins/prometheus/exporter.lua index 45a79c5..85f7436 100644 --- a/apisix/plugins/prometheus/exporter.lua +++ b/apisix/plugins/prometheus/exporter.lua @@ -69,7 +69,7 @@ function _M.init() clear_tab(metrics) - -- Newly added metrics should follow the naming best pratices described in + -- Newly added metrics should follow the naming best practices described in -- https://prometheus.io/docs/practices/naming/#metric-names -- For example, -- 1. Add unit as the suffix diff --git a/apisix/utils/batch-processor.lua b/apisix/utils/batch-processor.lua index 18919c3..2839a85 100644 --- a/apisix/utils/batch-processor.lua +++ b/apisix/utils/batch-processor.lua @@ -169,7 +169,7 @@ end function batch_processor:process_buffer() -- If entries are present in the buffer move the entries to processing if #self.entry_buffer.entries > 0 then - core.log.debug("tranferring buffer entries to processing pipe line, ", + core.log.debug("transferring buffer entries to processing pipe line, ", "buffercount[", #self.entry_buffer.entries ,"]") self.batch_to_process[#self.batch_to_process + 1] = self.entry_buffer self.entry_buffer = { entries = {}, retry_count = 0 } diff --git a/conf/config-default.yaml b/conf/config-default.yaml index bff7e34..aaa8219 100644 --- a/conf/config-default.yaml +++ b/conf/config-default.yaml @@ -115,13 +115,13 @@ apisix: # If set this, must be a string of length 16. And it will encrypt ssl key with AES-128-CBC # !!! So do not change it after saving your ssl, it can't decrypt the ssl keys have be saved if you change !! -nginx_config: # config for render the template to genarate nginx.conf +nginx_config: # config for render the template to generate nginx.conf error_log: "logs/error.log" error_log_level: "warn" # warn,error worker_processes: auto # one worker will get best performance, you can use "auto", but remember it is just work well only on physical machine # no more than 8 workers, otherwise competition between workers will consume a lot of resources # if you want use multiple cores in container, you can inject the number of cpu as environment variable "APISIX_WORKER_PROCESSES" - enable_cpu_affinity: true # enbale cpu affinity, this is just work well only on physical machine + enable_cpu_affinity: true # enable cpu affinity, this is just work well only on physical machine worker_rlimit_nofile: 20480 # the number of files a worker process can open, should be larger than worker_connections worker_shutdown_timeout: 240s # timeout for a graceful shutdown of worker processes event: @@ -195,7 +195,7 @@ etcd: # read: 5000 # default 5000ms graphql: - max_size: 1048576 # the maximum size limitation of graphql in bytes, defualt 1MiB + max_size: 1048576 # the maximum size limitation of graphql in bytes, default 1MiB plugins: # plugin list (sorted in alphabetical order) - api-breaker diff --git a/doc/README.md b/doc/README.md index 00226c8..9961f6a 100644 --- a/doc/README.md +++ b/doc/README.md @@ -42,7 +42,7 @@ ### General -* [batch-requests](plugins/batch-requests.md): Allow you send mutiple http api via **http pipeline**. +* [batch-requests](plugins/batch-requests.md): Allow you send multiple http api via **http pipeline**. * [hot reload](plugins.md): Hot reload without reload service. * [HTTPS/TLS](https.md): Dynamic load the SSL Certificate by Server Name Indication (SNI). * [serverless](plugins/serverless.md):Allows to dynamically run Lua code at *different* phase in APISIX. @@ -74,7 +74,7 @@ ### Traffic * [limit-req](plugins/limit-req.md): Request rate limiting and adjustment based on the "leaky bucket" method. -* [limit-conn](plugins/limit-conn.md): Limite request concurrency (or concurrent connections). +* [limit-conn](plugins/limit-conn.md): Limit request concurrency (or concurrent connections). * [limit-count](plugins/limit-count.md): Rate limiting based on a "fixed window" implementation. * [proxy-cache](plugins/proxy-cache.md): Provides the ability to cache upstream response data. * [request-validation](plugins/request-validation.md): Validates requests before forwarding to upstream. diff --git a/doc/aws.md b/doc/aws.md index 9fba1b3..71b6f02 100644 --- a/doc/aws.md +++ b/doc/aws.md @@ -208,7 +208,7 @@ Name: apiSi-PhpSe-FOL2MM4TW7G8-09029e095ab36fcc.elb.us-west-2.amazonaws.com Address: 44.226.102.63 ``` -Configure the IP addresses returned as your upstream nodes in your **APISIX** dashboard followed by the **Services** and **Routes** configuration. Let's say we have a `/index.php` as the URI for the first route for our first **Service** from the **Upstream** IP adddresses. +Configure the IP addresses returned as your upstream nodes in your **APISIX** dashboard followed by the **Services** and **Routes** configuration. Let's say we have a `/index.php` as the URI for the first route for our first **Service** from the **Upstream** IP addresses. ![](images/aws-nlb-ip-addr.png) diff --git a/doc/discovery.md b/doc/discovery.md index 5ed7f6d..feb6cc6 100644 --- a/doc/discovery.md +++ b/doc/discovery.md @@ -171,8 +171,8 @@ Add following configuration in `conf/config.yaml` : discovery: eureka: host: # it's possible to define multiple eureka hosts addresses of the same eureka cluster. - - "http://${usename}:${passowrd}@${eureka_host1}:${eureka_port1}" - - "http://${usename}:${passowrd}@${eureka_host2}:${eureka_port2}" + - "http://${username}:${password}@${eureka_host1}:${eureka_port1}" + - "http://${username}:${password}@${eureka_host2}:${eureka_port2}" prefix: "/eureka/" fetch_interval: 30 # 30s weight: 100 # default weight for node diff --git a/doc/how-to-build.md b/doc/how-to-build.md index 013d764..84bab65 100644 --- a/doc/how-to-build.md +++ b/doc/how-to-build.md @@ -131,7 +131,7 @@ make sure to set openresty as default nginx. And export the path as below. * export PATH=/usr/local/opt/openresty/nginx/sbin:$PATH **Run Individual Test Cases** -- Use the following command to run test cases constratined to a file: +- Use the following command to run test cases constrained to a file: - prove -Itest-nginx/lib -r t/plugin/openid-connect.t ## 5. Update Admin API token to protect Apache APISIX diff --git a/doc/install-dependencies.md b/doc/install-dependencies.md index 59f6ab5..5ebe871 100644 --- a/doc/install-dependencies.md +++ b/doc/install-dependencies.md @@ -30,7 +30,7 @@ Note ==== - Since v2.0 Apache APISIX would not support the v2 protocol storage to etcd anymore, and the minimum etcd version supported is v3.4.0. What's more, etcd v3 uses gRPC as the messaging protocol, while Apache APISIX uses HTTP(S) to communicate with etcd cluster, so be sure the [etcd gRPC gateway](https://etcd.io/docs/v3.4.0/dev-guide/api_grpc_gateway/) is enabled. -- Now by default Apache APISIX uses HTTP protocol to talk with etcd cluster, which is insecure. Please configure certificate and correspsonding private key for your etcd cluster, and use "https" scheme explicitly in the etcd endpoints list in your Apache APISIX configuration, if you want to keep the data secure and integral. See the etcd section in `conf/config-default.yaml` for more details. +- Now by default Apache APISIX uses HTTP protocol to talk with etcd cluster, which is insecure. Please configure certificate and corresponding private key for your etcd cluster, and use "https" scheme explicitly in the etcd endpoints list in your Apache APISIX configuration, if you want to keep the data secure and integral. See the etcd section in `conf/config-default.yaml` for more details. - If you want use Tengine instead of OpenResty, please take a look at this installation step script [Install Tengine at Ubuntu](../.travis/linux_tengine_runner.sh). diff --git a/doc/plugins/authz-keycloak.md b/doc/plugins/authz-keycloak.md index afb40d7..b05d8b5 100644 --- a/doc/plugins/authz-keycloak.md +++ b/doc/plugins/authz-keycloak.md @@ -31,7 +31,7 @@ ## Name `authz-keycloak` is an authorization plugin to be used with the Keycloak Identity Server. Keycloak is an OAuth/OIDC and -UMA compliant Ideneity Server. Although, its developed to working in conjunction with Keycloak it should work with any +UMA compliant Identity Server. Although, its developed to working in conjunction with Keycloak it should work with any OAuth/OIDC and UMA compliant identity providers as well. For more information on Keycloak, refer to [Keycloak Authorization Docs](https://www.keycloak.org/docs/latest/authorization_services) for more information. diff --git a/doc/plugins/batch-requests.md b/doc/plugins/batch-requests.md index 04ab426..463a9ac 100644 --- a/doc/plugins/batch-requests.md +++ b/doc/plugins/batch-requests.md @@ -53,7 +53,7 @@ Default enabled ## How To Configure -By default, the maximun body size sent to the `/apisix/batch-requests` can't be larger than 1 MiB. +By default, the maximum body size sent to the `/apisix/batch-requests` can't be larger than 1 MiB. You can configure it via `apisix/admin/plugin_metadata/batch-requests`: ```shell @@ -67,7 +67,7 @@ curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/batch-requests -H 'X-API | Name | Type | Requirement | Default | Valid | Description | | ---------------- | ------- | ------ | ------------- | ------- | ------------------------------------------------ | -| max_body_size | integer | required | 1048576 | > 0 | the maximun of request body size in bytes | +| max_body_size | integer | required | 1048576 | > 0 | the maximum of request body size in bytes | ## Batch API Request/Response diff --git a/doc/plugins/fault-injection.md b/doc/plugins/fault-injection.md index f2f4039..3e96c27 100644 --- a/doc/plugins/fault-injection.md +++ b/doc/plugins/fault-injection.md @@ -28,7 +28,7 @@ Fault injection plugin, this plugin can be used with other plugins and will be e | Name | Type | Requirement | Default | Valid | Description | | ----------------- | ------- | ----------- | ------- | ---------- | ------------------------------------------------ | | abort.http_status | integer | required | | [200, ...] | user-specified http code returned to the client. | -| abort.body | string | optional | | | response data returned to the client. Nginx varialbe can be used inside, like `client addr: $remote_addr\n` | +| abort.body | string | optional | | | response data returned to the client. Nginx variable can be used inside, like `client addr: $remote_addr\n` | | abort.percentage | integer | optional | | [0, 100] | percentage of requests to be aborted. | | delay.duration | number | required | | | delay time (can be decimal). | | delay.percentage | integer | optional | | [0, 100] | percentage of requests to be delayed. | diff --git a/doc/plugins/grpc-transcode.md b/doc/plugins/grpc-transcode.md index 9c58dee..f16f72a 100644 --- a/doc/plugins/grpc-transcode.md +++ b/doc/plugins/grpc-transcode.md @@ -179,7 +179,7 @@ Trailer: grpc-message {"workflowKey":"#2251799813685260","workflowInstanceKey":"#2251799813688013","bpmnProcessId":"order-process","version":1} ``` -`"workflowKey":"#2251799813685260"` suggests pb_option configuation success. +`"workflowKey":"#2251799813685260"` suggests pb_option configuration success. ## Disable Plugin diff --git a/doc/plugins/kafka-logger.md b/doc/plugins/kafka-logger.md index 633972f..1baffed 100644 --- a/doc/plugins/kafka-logger.md +++ b/doc/plugins/kafka-logger.md @@ -48,7 +48,7 @@ For more info on Batch-Processor in Apache APISIX please refer. | key | string | optional | | | Used for partition allocation of messages. | | timeout | integer | optional | 3 | [1,...] | Timeout for the upstream to send data. | | name | string | optional | "kafka logger" | | A unique identifier to identity the batch processor. | -| meta_format | enum | optional | "default" | ["default","origin"] | `default`: collect the request information with detfault JSON way. `origin`: collect the request information with original HTTP request. [example](#examples-of-meta_format)| +| meta_format | enum | optional | "default" | ["default","origin"] | `default`: collect the request information with default JSON way. `origin`: collect the request information with original HTTP request. [example](#examples-of-meta_format)| | batch_max_size | integer | optional | 1000 | [1,...] | Set the maximum number of logs sent in each batch. When the number of logs reaches the set maximum, all logs will be automatically pushed to the `Kafka` service. | | inactive_timeout | integer | optional | 5 | [1,...] | The maximum time to refresh the buffer (in seconds). When the maximum refresh time is reached, all logs will be automatically pushed to the `Kafka` service regardless of whether the number of logs in the buffer reaches the set maximum number. | | buffer_duration | integer | optional | 60 | [1,...] | Maximum age in seconds of the oldest entry in a batch before the batch must be processed.| diff --git a/doc/plugins/mqtt-proxy.md b/doc/plugins/mqtt-proxy.md index b802c37..8d0d56b 100644 --- a/doc/plugins/mqtt-proxy.md +++ b/doc/plugins/mqtt-proxy.md @@ -38,7 +38,7 @@ And this plugin both support MQTT protocol [3.1.*](http://docs.oasis-open.org/mq | Name | Type | Requirement | Default | Valid | Description | | -------------- | ------- | ----------- | ------- | ----- | -------------------------------------------------------------------------------------- | -| protocol_name | string | required | | | Name of protocol, shoulds be `MQTT` in normal. | +| protocol_name | string | required | | | Name of protocol, should be `MQTT` in normal. | | protocol_level | integer | required | | | Level of protocol, it should be `4` for MQTT `3.1.*`. it should be `5` for MQTT `5.0`. | | upstream.ip | string | required | | | IP address of upstream, will forward current request to. | | upstream.port | number | required | | | Port of upstream, will forward current request to. | diff --git a/doc/plugins/referer-restriction.md b/doc/plugins/referer-restriction.md index afc66d3..f177a3b 100644 --- a/doc/plugins/referer-restriction.md +++ b/doc/plugins/referer-restriction.md @@ -30,7 +30,7 @@ ## Name The `referer-restriction` can restrict access to a Service or a Route by -whitelisting request header Referers. +whitelisting request header Referrers. ## Attributes diff --git a/doc/plugins/response-rewrite.md b/doc/plugins/response-rewrite.md index 23cf415..d08b036 100644 --- a/doc/plugins/response-rewrite.md +++ b/doc/plugins/response-rewrite.md @@ -32,7 +32,7 @@ response rewrite plugin, rewrite the content returned by the upstream as well as Apache APISIX itself. -**senario**: +**scenario**: 1. can set `Access-Control-Allow-*` series field to support CORS(Cross-origin Resource Sharing). 2. we can set customized `status_code` and `Location` field in header to achieve redirect, you can also use [redirect](redirect.md) plugin if you just want a redirection. diff --git a/doc/plugins/skywalking.md b/doc/plugins/skywalking.md index 983daaf..e38cbab 100644 --- a/doc/plugins/skywalking.md +++ b/doc/plugins/skywalking.md @@ -193,7 +193,7 @@ $ curl http://127.0.0.1:2379/v2/keys/apisix/routes/1 -H 'X-API-KEY: edd1c9f0343 The skywalking plugin has been disabled now. It works for other plugins. -If you want to disable skywalking plugin totally, for example, stop the background repor timer, +If you want to disable skywalking plugin totally, for example, stop the background report timer, you need to comment out in the `config.yaml`: ```yaml diff --git a/doc/plugins/sls-logger.md b/doc/plugins/sls-logger.md index a28af99..c2e0482 100644 --- a/doc/plugins/sls-logger.md +++ b/doc/plugins/sls-logger.md @@ -43,8 +43,8 @@ For more info on Batch-Processor in Apache APISIX please refer |host |required | IP address or the Hostname of the TCP server, please reference ali cloud log [Serve List](https://help.aliyun.com/document_detail/29008.html?spm=a2c4g.11186623.2.14.49301b4793uX0z#reference-wgx-pwq-zdb), use IP address insted of domain.| |port |required |Target upstream port, default 10009.| |timeout |optional |Timeout for the upstream to send data.| -| project |required|Ali cloud log service project name,please creat in sls before us this plugin.| -| logstore | required |Ali cloud log service logstore name,please creat in sls before us this plugin.| +| project |required|Ali cloud log service project name,please create in sls before us this plugin.| +| logstore | required |Ali cloud log service logstore name,please create in sls before us this plugin.| | access_key_id | required | Ali cloud AccessKey ID, reference [Authorization](https://help.aliyun.com/document_detail/47664.html?spm=a2c4g.11186623.2.15.49301b47lfvxXP#task-xsk-ttc-ry).| | access_key_secret | required |Ali cloud AccessKey Secret, reference [Authorization](https://help.aliyun.com/document_detail/47664.html?spm=a2c4g.11186623.2.15.49301b47lfvxXP#task-xsk-ttc-ry).| | include_req_body | required| Boolean value. | diff --git a/doc/plugins/tcp-logger.md b/doc/plugins/tcp-logger.md index 7a9f1f6..efb0645 100644 --- a/doc/plugins/tcp-logger.md +++ b/doc/plugins/tcp-logger.md @@ -33,7 +33,7 @@ This will provide the ability to send Log data requests as JSON objects to Monitoring tools and other TCP servers. -This plugin provides the ability to push Log data as a batch to you're external TCP servers. In case if you did not receive the log data don't worry give it some time it will automatically send the logs after the timer function expires in our Batch Processor. +This plugin provides the ability to push Log data as a batch to your external TCP servers. In case if you did not receive the log data don't worry give it some time it will automatically send the logs after the timer function expires in our Batch Processor. For more info on Batch-Processor in Apache APISIX please refer. [Batch-Processor](../batch-processor.md) diff --git a/doc/plugins/zipkin.md b/doc/plugins/zipkin.md index 33d2d85..81528a1 100644 --- a/doc/plugins/zipkin.md +++ b/doc/plugins/zipkin.md @@ -40,7 +40,7 @@ It's also works with `Apache SkyWalking`, which is support Zipkin v1/v2 format. | endpoint | string | required | | | the http endpoint of Ziplin, for example: `http://127.0.0.1:9411/api/v2/spans`. | | sample_ratio | number | required | | [0.00001, 1] | the ratio of sample | | service_name | string | optional | "APISIX" | | service name for zipkin reporter | -| server_addr | string | optional | | | IPv4 address for zipkin reporter, default is nginx built-in variables $server_addr, here you can speific your external ip address. | +| server_addr | string | optional | | | IPv4 address for zipkin reporter, default is nginx built-in variables $server_addr, here you can specify your external ip address. | ## How To Enable diff --git a/doc/zh-cn/discovery.md b/doc/zh-cn/discovery.md index c353844..68dcb29 100644 --- a/doc/zh-cn/discovery.md +++ b/doc/zh-cn/discovery.md @@ -169,8 +169,8 @@ discovery: discovery: eureka: host: # it's possible to define multiple eureka hosts addresses of the same eureka cluster. - - "http://${usename}:${passowrd}@${eureka_host1}:${eureka_port1}" - - "http://${usename}:${passowrd}@${eureka_host2}:${eureka_port2}" + - "http://${username}:${password}@${eureka_host1}:${eureka_port1}" + - "http://${username}:${password}@${eureka_host2}:${eureka_port2}" prefix: "/eureka/" fetch_interval: 30 # 从 eureka 中拉取数据的时间间隔,默认30秒 weight: 100 # default weight for node diff --git a/t/plugin/http-logger.t b/t/plugin/http-logger.t index 789e1b7..9ff2d21 100644 --- a/t/plugin/http-logger.t +++ b/t/plugin/http-logger.t @@ -513,7 +513,7 @@ GET /t hello1 world --- error_log Batch Processor[http logger] batch max size has exceeded -tranferring buffer entries to processing pipe line, buffercount[2] +transferring buffer entries to processing pipe line, buffercount[2] Batch Processor[http logger] successfully processed the entries --- wait: 1.5