apisix/doc/zh-cn/plugins.md
2020-11-24 16:51:47 +08:00

38 lines
1.4 KiB
Markdown

<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-->
[English](../plugins.md)
## 热加载
APISIX 的插件是热加载的,不管你是新增、删除还是修改插件,都不需要重启服务。
只需要通过 admin API 发送一个 HTTP 请求即可:
```shell
curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
```
注意:如果你已经在路由规则里配置了某个插件(比如在 `route``plugins` 字段里面添加了它),然后
禁用了该插件,在执行路由规则的时候会跳过这个插件。
## stand-alone 模式下的热加载
参考 [stand alone 模式](stand-alone.md) 文档里关于配置插件的内容。