Skip to content

omit URL's password when stringifying URL for segment name #421

Open
@aloababa

Description

@aloababa

When instumenting an http.Client with an xray.Client, the segment name is based on url.URL.String which can lead to leak basic auth credentials in the segment name.

Is it possible to strip those credentials ? Or at least do the same that the stdlib does, they replace the password by a *** placeholder (like here: https://github.com/golang/go/blob/master/src/net/http/client.go#L1026)

I can see that you already strip the url query.

I can make a PR for it.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions