上一页 1 2 3 4 5 6 7 8 9 ··· 35 下一页
摘要: Now, let's say we would like to give a specific consumer a higher rate-limit. For this, we can create a KongPlugin resource and then associate it with 阅读全文
posted @ 2020-03-07 19:44 FromScratch 阅读(159) 评论(0) 推荐(0) 编辑
摘要: echo " apiVersion: configuration.konghq.com/v1 kind: KongPlugin metadata: name: global-rate-limit labels: global: \"true\" config: minute: 5 limit_by: 阅读全文
posted @ 2020-03-07 19:38 FromScratch 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1-Let's add a KongPlugin resource to protect the API: $ echo " apiVersion: configuration.konghq.com/v1 kind: KongPlugin metadata: name: httpbin-auth p 阅读全文
posted @ 2020-03-07 18:50 FromScratch 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 暴露出一个微服务echo " apiVersion: extensions/v1beta1 kind: Ingress metadata: name: demo spec: rules: - http: paths: - path: /foo backend: serviceName: httpbi 阅读全文
posted @ 2020-03-07 11:10 FromScratch 阅读(184) 评论(0) 推荐(0) 编辑
摘要: init_by_lua* 发生在master进程启动阶段。这里会对数据访问层进行初始化,加载插件的代码,构造路由规则表。init_worker_by_lua* 发生在worker进程启动阶段。这里会开启数据同步机制,执行每个插件的init_worker方法。 balancer.init() 读取数据 阅读全文
posted @ 2020-03-05 16:12 FromScratch 阅读(1005) 评论(0) 推荐(0) 编辑
摘要: charset UTF-8;error_log syslog:server=kong-hf.konghq.com:61828 error;error_log logs/error.log notice;client_max_body_size 0;proxy_ssl_server_name on;u 阅读全文
posted @ 2020-03-05 15:16 FromScratch 阅读(793) 评论(0) 推荐(0) 编辑
摘要: 在一个server块中为一个站点配置多个三级域名 实际网站目录结构中我们通常会为站点的二级域名独立创建一个目录,同样我们可以使用正则的捕获来实现在一个server块中配置多个三级域名: upstream xx1{ } upstream xx2{ } server { listen 80; serve 阅读全文
posted @ 2020-03-01 16:04 FromScratch 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 无头的openresty,去掉了守护运行,把代码加载到init_worker_by_lua directive处执行run in the context of ngx.timer callback里面resty --shdict='dogs 1m' -e 'local dict = ngx.shar 阅读全文
posted @ 2020-03-01 11:33 FromScratch 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 这时假设 package.path 的值是: /Users/dengjoe/lua/?.lua;./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lu 阅读全文
posted @ 2020-02-29 22:58 FromScratch 阅读(188) 评论(0) 推荐(0) 编辑
摘要: # nginx.conf http { # you do not need to configure the following line when you # use LuaRocks or opm. lua_package_path "/path/to/lua-resty-mlcache/lib 阅读全文
posted @ 2020-02-29 19:45 FromScratch 阅读(248) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 35 下一页