Closed aiudirog closed 4 years ago
Hmm. This is a bit scope creep, but I wonder if we ought to have some docs for how to use a context on multiple hosts, or maybe a test. Unfortunately I didn't have this use case in mind when porting, so target_name
is poorly named - it should probably mention the behavior with respect to "@" for clarity.
Let me know if you'd prefer me to make those changes.
It's half designed already multiple hosts, so I would say it's probably best to support it completely. Feel free to make the changes when you have time, I'm definitely not an expert on that part.
Currently, the target_name is updated to include the host the first time a request header is generated if the target_name is a string without an '@'. This locks the user into using only a single host, defeating the purpose of storing the contexts on a hostname basis.
I've updated the code to not update the target_name inplace and instead just use it to create the security context.