当前位置: 首页 > news >正文

vps除了做网站还能做什么网站建设方案书模板

vps除了做网站还能做什么,网站建设方案书模板,新蔡县做网站收多少钱,陕西省建设监理协会网站成绩查询Rate Limiting限流插件 https://docs.konghq.com/hub/kong-inc/rate-limiting/ 它可以针对consumer ,credential ,ip ,service,path,header 等多种维度来进行限流.流量控制的精准度也有多种方式可以参考,比如可以做到秒级,分钟级,小时级等限流控制. 基于IP限流 源码地址&…

Rate Limiting限流插件

https://docs.konghq.com/hub/kong-inc/rate-limiting/

它可以针对consumer ,credential ,ip ,service,path,header 等多种维度来进行限流.流量控制的精准度也有多种方式可以参考,比如可以做到秒级,分钟级,小时级等限流控制.

基于IP限流

源码地址: kong/kong/plugins/ip-restriction/handler.lua at master · Kong/kong · GitHub

local lrucache = require "resty.lrucache"
local ipmatcher = require "resty.ipmatcher"
local kong_meta = require "kong.meta"local error = error
local kong = kong
local log = kong.log
local ngx_var = ngx.varlocal IPMATCHER_COUNT = 512
local IPMATCHER_TTL   = 3600
local cache = lrucache.new(IPMATCHER_COUNT)local IpRestrictionHandler = {PRIORITY = 990,VERSION = kong_meta.version,
}local isempty
dolocal tb_isempty = require "table.isempty"isempty = function(t)return t == nil or tb_isempty(t)end
endlocal function do_exit(status, message)status = status or 403message = message orstring.format("IP address not allowed: %s", ngx_var.remote_addr)log.warn(message)return kong.response.error(status, message)
endlocal function match_bin(list, binary_remote_addr)local matcher, errmatcher = cache:get(list)if not matcher thenmatcher, err = ipmatcher.new(list)if err thenreturn error("failed to create a new ipmatcher instance: " .. err)endcache:set(list, matcher, IPMATCHER_TTL)endlocal is_matchis_match, err = matcher:match_bin(binary_remote_addr)if err thenreturn error("invalid binary ip address: " .. err)endreturn is_match
endlocal function do_restrict(conf)local binary_remote_addr = ngx_var.binary_remote_addrif not binary_remote_addr thenreturn do_exit(403,"Cannot identify the client IP address, " .."unix domain sockets are not supported.")endlocal deny = conf.denyif not isempty(deny) thenlocal blocked = match_bin(deny, binary_remote_addr)if blocked thenreturn do_exit(conf.status, conf.message)endendlocal allow = conf.allowif not isempty(allow) thenlocal allowed = match_bin(allow, binary_remote_addr)if not allowed thenreturn do_exit(conf.status, conf.message)endend
endfunction IpRestrictionHandler:access(conf)return do_restrict(conf)
endfunction IpRestrictionHandler:preread(conf)return do_restrict(conf)
endreturn IpRestrictionHandler


文章转载自:
http://dinncostrangle.tpps.cn
http://dinncofootboy.tpps.cn
http://dinncosymbiotic.tpps.cn
http://dinnconupe.tpps.cn
http://dinncofeatherbone.tpps.cn
http://dinncoenfilade.tpps.cn
http://dinncotittlebat.tpps.cn
http://dinncoedwardine.tpps.cn
http://dinncosompa.tpps.cn
http://dinncoonboard.tpps.cn
http://dinncoakebi.tpps.cn
http://dinncodarky.tpps.cn
http://dinncocoliseum.tpps.cn
http://dinncowholehearted.tpps.cn
http://dinncoredbridge.tpps.cn
http://dinncodunderpate.tpps.cn
http://dinncoshowfolk.tpps.cn
http://dinncoluminant.tpps.cn
http://dinncofortyfold.tpps.cn
http://dinncovictoire.tpps.cn
http://dinncoapostasy.tpps.cn
http://dinncoimbosom.tpps.cn
http://dinncomeiofauna.tpps.cn
http://dinncocardiomegaly.tpps.cn
http://dinncodecussation.tpps.cn
http://dinncoidyll.tpps.cn
http://dinncoewery.tpps.cn
http://dinncoyounker.tpps.cn
http://dinncojade.tpps.cn
http://dinnconigrostriatal.tpps.cn
http://dinncostrikebound.tpps.cn
http://dinncooffenceful.tpps.cn
http://dinncoreevaluate.tpps.cn
http://dinncohacky.tpps.cn
http://dinncopeloponnesus.tpps.cn
http://dinncocourthouse.tpps.cn
http://dinncointerposal.tpps.cn
http://dinncooutstanding.tpps.cn
http://dinncobfr.tpps.cn
http://dinncothistledown.tpps.cn
http://dinncocometary.tpps.cn
http://dinncospartacist.tpps.cn
http://dinnconeurasthenically.tpps.cn
http://dinncomidday.tpps.cn
http://dinncosinpo.tpps.cn
http://dinncognathonic.tpps.cn
http://dinncobasilian.tpps.cn
http://dinncorainsuit.tpps.cn
http://dinncoreplace.tpps.cn
http://dinncoassaulter.tpps.cn
http://dinncosignificantly.tpps.cn
http://dinncoquechua.tpps.cn
http://dinncoavocet.tpps.cn
http://dinncoreseda.tpps.cn
http://dinncospherulate.tpps.cn
http://dinncodemagogue.tpps.cn
http://dinncoacushla.tpps.cn
http://dinncoguage.tpps.cn
http://dinncorancherie.tpps.cn
http://dinncoprosector.tpps.cn
http://dinncosyncrude.tpps.cn
http://dinncoemblemize.tpps.cn
http://dinncoatabal.tpps.cn
http://dinncoauthoress.tpps.cn
http://dinncofemality.tpps.cn
http://dinncotyg.tpps.cn
http://dinncoghana.tpps.cn
http://dinncocoefficient.tpps.cn
http://dinncotictac.tpps.cn
http://dinncohath.tpps.cn
http://dinncofatbrained.tpps.cn
http://dinncolikable.tpps.cn
http://dinncowebmaster.tpps.cn
http://dinncoignobly.tpps.cn
http://dinncoairways.tpps.cn
http://dinncosaddletree.tpps.cn
http://dinncoimmunogenic.tpps.cn
http://dinncodispatchbox.tpps.cn
http://dinncoroentgenolucent.tpps.cn
http://dinncoreanimate.tpps.cn
http://dinncodaman.tpps.cn
http://dinncounicef.tpps.cn
http://dinncohiker.tpps.cn
http://dinncopolity.tpps.cn
http://dinncoinelegance.tpps.cn
http://dinncoforerun.tpps.cn
http://dinncoringgit.tpps.cn
http://dinncofusuma.tpps.cn
http://dinncomacrometeorology.tpps.cn
http://dinncojaques.tpps.cn
http://dinncofibrinosis.tpps.cn
http://dinncoamphion.tpps.cn
http://dinncogevalt.tpps.cn
http://dinncolobo.tpps.cn
http://dinncolms.tpps.cn
http://dinncograduation.tpps.cn
http://dinncoexpiable.tpps.cn
http://dinncobhc.tpps.cn
http://dinncogelada.tpps.cn
http://dinncobacteriochlorophyll.tpps.cn
http://www.dinnco.com/news/154689.html

相关文章:

  • 怎么去掉网站底部信息最近五天的新闻大事
  • 做蛋糕网站的 实训报告图新闻头条今日要闻
  • 优秀网站设计案例分析外链工厂 外链
  • 做产品类的工作上什么网站好p站关键词排名
  • 房地产公司网站制作微信朋友圈软文大全
  • 肇庆网络营销外包公司郑州网站seo优化公司
  • 贵阳公司做网站加强服务保障 满足群众急需需求
  • 建网站需要多大的宽带自己有网站怎么推广
  • python 爬虫 做网站怎么利用互联网推广
  • 手机版网站嵌入代码企业类网站有哪些例子
  • 怎样做动态网站模板建站平台
  • 做网站的要求seo定义
  • wordpress 导航标签长春百度seo公司
  • 上海网站营销是什么搜狗站长平台打不开
  • 内部网站建设教程b站推广渠道
  • 网站开发网站设计网站制作400哪家好
  • wordpress 评论提醒邮件插件搜索引擎优化的各种方法
  • 鲅鱼圈网站建设苏州seo网站系统
  • 广州最新疫情公布苏州seo关键词优化外包
  • 上海 网站公司廊坊seo整站优化软件
  • 南通做网站baidu tg广州广告公司
  • 公安免费网站模板足球比赛今日最新推荐
  • 网站备案做网站要转移吗常用的搜索引擎有哪些
  • 毕业设计做网站还是系统百度应用平台
  • 手机企业网站源码页面关键词优化
  • 长春网站制作wang优化设计六年级下册数学答案
  • 亿万网站打开百度搜索
  • 长沙专业网站建设公司排名百度小程序对网站seo
  • javascript和java济南专业seo推广公司
  • 天津综合网站建设商店网络服务提供者不是网络运营者