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

幻影图片一键制作网站建筑工程是干嘛的

幻影图片一键制作网站,建筑工程是干嘛的,湖南省建设厅网站官网,wordpress如何设置支付宝应用场景#xff1a; 用户请求想要生产的流量打到原有服务的同时#xff0c;打到新开发的服务上试一下 注意的点#xff1a; 1 nginx是不读请求体的#xff0c;需要在配置文件中打开#xff0c;或者读取前调用ngx.req.read_body()#xff0c;然后通过local data ngx.r…应用场景 用户请求想要生产的流量打到原有服务的同时打到新开发的服务上试一下 注意的点 1 nginx是不读请求体的需要在配置文件中打开或者读取前调用ngx.req.read_body()然后通过local data ngx.req.get_body_data()获取 2 header转发时如果原请求里有accept-encoding这样支持压缩的声明返回的是二进制记录日志不方便读取要单独处理下   -- mirror.lua local core require(apisix.core) local http require(resty.http) local json require(apisix.core.json)local plugin_name mirrorlocal schema {type object,properties {uri {type string,},serviceHost {type string,},serviceName {type string,},method {type string,enum {POST, GET},default POST},timeout {type number,default 3000},}, }local _M {version 0.1,priority 98,name plugin_name,schema schema, }function _M.check_schema(conf)local ok, errok, err core.schema.check(schema, conf)if not ok thenreturn false, errendif not conf.serviceHost thenconf.serviceHost conf.serviceNameendif conf.timeout 0 thenconf.timeout 5 * 1000endreturn true end-- timeout in ms local function http_req(method, uri, body, myheaders, timeout)local httpc http.new()if timeout thenhttpc:set_timeout(timeout)endmyheaders[accept-encoding] nilcore.log.info(Mirrored request http uri , uri, method , method)core.log.info(Mirrored request http header , core.json.delay_encode(myheaders))core.log.info(Mirrored request http req param , core.json.delay_encode(body))local res, err httpc:request_uri(uri, {method method,body body,headers myheaders,ssl_verify false})core.log.info(Mirrored request http status , res.status)core.log.info(Mirrored request http body , res.body)return res endfunction _M.access(conf, ctx)core.log.info(Mirrored request start )ngx.req.read_body()local data ngx.req.get_body_data()local req_headers ngx.req.get_headers()req_headers[Host] conf.servicHostcore.log.info(Mirrored request conf , core.json.delay_encode(conf))local method conf.methodif not method or method nil or method thenmethod ngx.req.get_method()endlocal url conf.serviceNameif not conf.uri or conf.uri nil or conf.uri thenurl url .. ngx.var.urielseurl url .. conf.uriendlocal args, err ngx.req.get_uri_args()if G thenlocal first truefor key, val in pairs(args) doif first thenurl url .. ?first falseelseurl url .. endurl url .. key .. .. valendendlocal res,err http_req(method, url, data, req_headers, conf.timeout)core.log.info(Mirrored request end) endreturn _M
http://www.pierceye.com/news/405689/

相关文章:

  • 南宁网站推广经理做动漫网站如何应用数据绑定
  • 眼镜东莞网站建设兰州公司做网站
  • 改成 响应式 网站重庆微信企业网站
  • 用微信怎么做商城网站微信官网下载安装
  • 汽车网站建设方案预算md风格的wordpress主题
  • 免费外贸网站模板dede 网站栏目管理
  • 做网站有包括哪些东西站长素材网
  • 淘宝做促销的网站网站开发报价清单
  • 备案查询网站网站建设中可能遇到的问题
  • 怎么注册网站的步骤快速建站官网
  • 网站怎么做口碑wordpress淘宝客知乎
  • 响应式网站建设信息网站建设宽带
  • ps如何做网站超级链接微信公众平台运营中心电话
  • 网站建设怎么估算费用和报价h5特效网站欣赏
  • 东软集团建设网站娱乐网站排行榜
  • 石家庄网站建站米拓建站官网怎么用不了
  • 推广seo网站的公司金华网站建设公司排名
  • 阿里巴巴网站工作流程网站建设 教学设计
  • 电子商务网站建设的方法怎样用织梦做音乐网站
  • 临夏州住房和城乡建设局网站出词
  • 企业网站的综合要求最新领导班子7人名单
  • 通过阿里云建设企业网站联想企业网站建设的思路
  • 网站建设服务器的选择方案建设报名系统是正规网站吗
  • 揭阳高端模板建站WordPress背景音乐6
  • 如何使用云服务建设网站cpa之家 app推广平台
  • 网站设计策划书案例漳浦建设局网站
  • ps做分享类网站效果图设计公司工作室创业规划
  • 个人虚拟机做网站设计实例网站
  • 衡阳企业网站wordpress置顶文章顺序
  • 网站建设宗旨是指郑州有名的做网页的公司