membphis commented on issue #1280: request help: How do I enable the plug-in when using the standalone model(local yaml)? URL: https://github.com/apache/incubator-apisix/issues/1280#issuecomment-600103150 please take a look, it works fine for me. ```shell $ curl http://127.0.0.1:9080/hello -i HTTP/1.1 200 OK Content-Type: text/plain Transfer-Encoding: chunked Connection: keep-alive X-RateLimit-Limit: 1 X-RateLimit-Remaining: 0 Server: APISIX web server Date: Tue, 17 Mar 2020 14:29:31 GMT cur time: 1584455371 $ curl http://127.0.0.1:9080/hello -i HTTP/1.1 503 Service Temporarily Unavailable Date: Tue, 17 Mar 2020 14:29:33 GMT Content-Type: text/html Content-Length: 194 Connection: keep-alive Server: APISIX web server ``` ```diff diff --git a/conf/apisix.yaml b/conf/apisix.yaml index 1a406aea..91644cbc 100644 --- a/conf/apisix.yaml +++ b/conf/apisix.yaml @@ -14,12 +14,22 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# example + routes: - uri: /hello + service_id: 1 +services: + - + id: 1 upstream: nodes: "127.0.0.1:1980": 1 type: roundrobin + plugins: + limit-count: + count: 1 + time_window: 60 + rejected_code: 503 + key: remote_addr #END diff --git a/conf/config.yaml b/conf/config.yaml index 4bb942d0..d1c756f3 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -23,7 +23,7 @@ apisix: enable_dev_mode: false # Sets nginx worker_processes to 1 if set to true enable_reuseport: true # Enable nginx SO_REUSEPORT switch if set to true. enable_ipv6: true - config_center: etcd # etcd: use etcd to store the config value + config_center: yaml # etcd: use etcd to store the config value # yaml: fetch the config value from local yaml file `/your_path/conf/apisix.yaml` #proxy_protocol: # Proxy Protocol configuration ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
