gregleveque/gateway-bundle
Composer 安装命令:
composer require gregleveque/gateway-bundle
包简介
README 文档
README
Gie Gateaway Bundle
Table of Contents
Installation
composer require gregleveque/gateway-bundle
in AppKernel.php add
<?php // app/AppKernel.php public function registerBundles() { $bundles = [ // ... new Gie\GatwayBundle\GieGatewayBundle(), // ... ]; }
Configuration
gie_gateway: redis_dsn: 127.0.0.1 # default value routes: name: target: https://www.target.com query: a: - first - second b: 3 headers: Content-Type: application/json ttl: 60 # default value
When using routes defined in configuration, the client parameters ALWAYS overrides configuration parameters. For querystring, if the variable is an array, the client replace the first value by default.
- If you need to replace a configured value fron an array, use the index of the value in the querystring
...&a[1]=replaced
- If you need to add a new value in the array, use an unused index
...&a=[3]=added
Client usage
- Base route:
/api/gateway
- Configured routes:
/api/gateway/{route-name}
When using the default route or configured routes, there is 2 custom headers:
- X_GATEWAY_FORWARD: List of headers to forward separated by comma.
- X_GATEWAY_TTL: Change the default TTL of the response (default 60s)
统计信息
- 总下载量: 125
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-01