kork icon indicating copy to clipboard operation
kork copied to clipboard

fix(headers): avoid retrofit and okhttp adding duplicate headers

Open dmart opened this issue 1 year ago • 2 comments

With the addition of the okHttp3 request interceptor SpinnakerRequestHeaderInterceptor in https://github.com/spinnaker/kork/pull/1004 having retrofit1 add X-SPINNAKER-* headers is now redundant, this results in the headers being added twice to all retrofit1 client requests.

dmart avatar Nov 06 '23 16:11 dmart

For some requests the duplicate headers break Fiat auth calls which show up like the following, however I am unable to determine why some requests break and not others: FiatPermissionEvaluator : [david.martin@****, david.martin@****] Cannot get whole user permission for user david.martin@****, david.martin@****, reason: 404

dmart avatar Nov 06 '23 16:11 dmart

I suspect you're right about this. Would you mind adding a test that demonstrates it?

dbyron-sf avatar Nov 06 '23 17:11 dbyron-sf