movio / bramble

A federated GraphQL API gateway
https://movio.github.io/bramble/
MIT License
497 stars 53 forks source link

Add a plugin to allow headers passthrough #213

Closed pkqk closed 1 year ago

pkqk commented 1 year ago

Headers listed in the allowed-headers field of the plugin config will be passed from the client request to downstream services. This allows passing information like Authorization headers or custom information.

{
  "plugins": [
    {
      "name": "headers",
      "config": {
        "allowed-headers": ["Authorization"],
      }
    }
  ]
}

Addresses #212 raised by @codedge.

codedge commented 1 year ago

Dang, that is exactly the plugin I wrote a couple of days ago 😄

pkqk commented 1 year ago

@codedge yeah it's pretty simple, you don't have to maintain your own one now though 😄 .