builder-next: reset identitymapping if empty

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2019-07-01 11:26:27 -07:00
parent e105a74c54
commit 0bdcc60c4c
1 changed files with 4 additions and 0 deletions

View File

@ -90,6 +90,10 @@ type Builder struct {
func New(opt Opt) (*Builder, error) {
reqHandler := newReqBodyHandler(tracing.DefaultTransport)
if opt.IdentityMapping != nil && opt.IdentityMapping.Empty() {
opt.IdentityMapping = nil
}
c, err := newController(reqHandler, opt)
if err != nil {
return nil, err