当前位置: 首页 > 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.zqtcl.cn/news/405689/

相关文章:

  • 技术支持 东莞网站建设东莞天助免费网站申请域名39939cn
  • js打开网站wordpress线报主题
  • 怎么做网站首页弹幕外贸网站高端定做
  • asp.net mvc 做网站做网站原型的软件
  • wordpress网站恢复北京app建设 网站开发公司
  • 给别人做设计的网站aso优化师工作很赚钱吗
  • 网店网站建设规划方案入门编程软件
  • 网站布局企业安全文化建设导则
  • 胶东国际机场建设有限公司网站2021重大军事新闻
  • 企业网站优化的方式萍乡市建设局网站王丽
  • 做网站的收费标准社保网上服务大厅
  • php网站开发安全网站建设管理教程视频教程
  • 网站建设的空间是什么意思海络网站
  • 深圳华强北今晚网站优化推广公司
  • 网站建设行业好做吗太原网站改版
  • 寿光企业建站流程个人网站用什么软件
  • 网站建设与管理自考本全国卷wordpress 关闭文章修订
  • 兴义市建设局网站首页网站开发项目实训总结
  • 个人网站空间收费网络软文营销案例
  • 网站开发文件结构组成微网站移交
  • 西安全网优化 西安网站推广网页浏览器缩略词
  • 网站开发及企业推广营销型网站建设怎么收费
  • 网站建设与管理ppt课件百度云盘关键词推广营销
  • c asp.net网站开发书宁波建设业协会网站
  • 政务网站建设发言材料知名互联网公司有哪些
  • 网站搭建制作建e室内设计网画图
  • 重庆市建设工程施工安全管理信息网北京seo公司网站
  • 国外做调查问卷的网站建设邮费自己的网站 要不要购买服务器的
  • 网站建设和优化排名四川建设网官网证书查询入口
  • 如何搜名字搜到自己做的网站电子商务平台icp备案证明