当前位置:Gxlcms > 数据库问题 > kong db_less 配置请求

kong db_less 配置请求

时间:2021-07-01 10:21:17 帮助过:9人阅读

services:

  • name: my-service
    url: http://www.kuaidi100.com/
    plugins:
    • name: key-auth
      routes:
    • name: my-route
      paths:
    • /aa

consumers:

  • username: my-user
    keyauth_credentials:
    • key: my-key

plugins:

  • name: syslog
    consumer: my-user
    service: my-service

测试:
curl -i -X GET --url "http://192.168.8.106:8000/aa/query?type=yuantong&postid=11111111111" --header "apikey:my-key" --header "host:www.kuaidi100.com"
返回:
{"message":"ok","nu":"11111111111","ischeck":"1","com":"yuantong","status":"200","condition":"F00","state":"3","data":[{"time":"2019-10-05 16:51:59","context":"查无结果","ftime":"2019-10-05 16:51:59"}]}

kong db_less 配置请求

标签:ike   als   user   routes   auth   key   services   condition   返回   

人气教程排行