cosmo
cosmo copied to clipboard
Header request insert from context
Component(s)
router
Is your feature request related to a problem? Please describe.
Currently its not possible to insert headers from context in the router, like we see on Apollo. It requires a custom module, but would be great to have this feature in the pure config file.
Describe the solution you'd like
Etc reading user_id from context in config.yaml
version: '1'
headers:
all: # Rules for all origin requests
request:
- insert:
name: "User-ID"
from_context: "user_id"
Describe alternatives you've considered
Create a custom plugin/module that supports to read from context and insert the header.
Additional context
No response