gregleveque/gateway-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固