7 ms·
Or perhaps even, insert yet another header with just the list of internal headers being added to the request, assuming this happens at a single place, otherwise
by 620gelato 2y ago
Or perhaps even, insert yet another header with just the list of internal headers being added to the request, assuming this happens at a single place, otherwise a recipe for disaster.
I have a slightly different example of this, where a rpc framework used in my company disallows the service owner from modifying certain headers (say request identifier), and will instead create a duplicate header with a suffix. In that scenario at least, I can see this as a fairly reasonable tradeoff, as the goal is to control certain headers from being modified, not because they are platform internal but because there are certain assumptions associated with those headers that are followed company-wide.
I'll go check what mechanism is used for this matching.
- amluto 2y agoThis doesn’t work if the front end is older than an internal node and a header gets added, at least not without extra logic to patch everything up and handle conflicts. The HTTP Connection header works like this, and one should generally assume that almost nothing implements it correctly.
- adrianmonk 2y ago> yet another header with just the list of internal headers Or the same but with a list of headers which AREN'T internal. You'll probably have a custom header-adding function that people should always use instead of the regular one. And this way, if someone forgets to use it, their header will get stripped. You can think of a header escaping the internal network as something that needs to be authorized. This is a deny by default approach.
- 620gelato 2y agoAh yes - perfect.