diff options
author | Nick Thomas <nick@gitlab.com> | 2021-03-16 15:25:44 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2021-03-16 15:25:44 +0000 |
commit | dc2bddcc325f224ba074cb4d67ecba44ed15daae (patch) | |
tree | 9c37f5ade4a95622b30a7a47befcb46b185b9682 /internal/gitlabnet | |
parent | e79f115d93a9f00f3e4f8a22ec770fdf4c3e1947 (diff) | |
parent | d539068dc372e46d10adee89e9b96b59156a2bb6 (diff) | |
download | gitlab-shell-dc2bddcc325f224ba074cb4d67ecba44ed15daae.tar.gz |
Merge branch '496-move-env-introspection-to-sshenv' into 'main'
chore: Move environment introspection to sshenv module
See merge request gitlab-org/gitlab-shell!451
Diffstat (limited to 'internal/gitlabnet')
-rw-r--r-- | internal/gitlabnet/accessverifier/client.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/gitlabnet/accessverifier/client.go b/internal/gitlabnet/accessverifier/client.go index 4a33d5b..9389257 100644 --- a/internal/gitlabnet/accessverifier/client.go +++ b/internal/gitlabnet/accessverifier/client.go @@ -10,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitlab-shell/internal/command/commandargs" "gitlab.com/gitlab-org/gitlab-shell/internal/config" "gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet" - "gitlab.com/gitlab-org/gitlab-shell/internal/sshenv" ) const ( @@ -87,11 +86,7 @@ func (c *Client) Verify(ctx context.Context, args *commandargs.Shell, action com request.KeyId = args.GitlabKeyId } - if args.RemoteAddr != nil { - request.CheckIp = args.RemoteAddr.IP.String() - } else { - request.CheckIp = sshenv.LocalAddr() - } + request.CheckIp = args.Env.RemoteAddr response, err := c.client.Post(ctx, "/allowed", request) if err != nil { |