Skip to content

Naoto-raimi/custom-request-transformer

Repository files navigation

custom-request-transformer

kongのプラグインのカスタマイズのサンプルになります
ここではrequest-transformerに環境変数の値を追加しています

詳しくはZennの記事をご覧ください

App Start

docker compose up -d --build

Sample Request

curl -X POST -H "Content-Type: application/json" -d '{"test": "test"}' http://localhost:8000/httpbin/post

>>> 
{
  "args": {}, 
  "data": "{\"secret\":\"secret\",\"test\":\"test\"}", 
  "files": {}, 
  "form": {}, 
  "headers": {
    "Accept": "*/*", 
    "Content-Length": "33", 
    "Content-Type": "application/json", 
    "Host": "httpbin.org", 
    "User-Agent": "curl/7.79.1", 
    "X-Forwarded-Host": "localhost", 
    "X-Forwarded-Path": "/httpbin/post", 
    "X-Forwarded-Prefix": "/httpbin/post"
  }, 
  "json": {
    "secret": "secret", 
    "test": "test"
  }, 
  "url": "http://localhost/post"
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published