diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 51cc9c0..0fbf16d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -29,6 +29,8 @@ jobs: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure fi + - name: Test + run: go test ./... - name: Build run: make build - name: Clean modcache @@ -39,7 +41,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - node-version: [ 20.x ] + node-version: [20.x] steps: - uses: actions/checkout@v3 name: Checkout repository @@ -55,4 +57,4 @@ jobs: - name: Build run: yarn build - working-directory: ui \ No newline at end of file + working-directory: ui diff --git a/daemon/wiretap_utils.go b/daemon/wiretap_utils.go index 8657677..7c2a616 100644 --- a/daemon/wiretap_utils.go +++ b/daemon/wiretap_utils.go @@ -20,24 +20,14 @@ func extractHeaders(resp *http.Response) map[string]any { func reconstructURL(r *http.Request, protocol, host, port string) string { url := fmt.Sprintf("%s://%s", protocol, host) - // pattern := "%s://%s:%s/%s?%s" - // urlString := fmt.Sprintf(pattern, protocol, host, port, r.URL.Path, r.URL.RawQuery) if port != "" { url += fmt.Sprintf(":%s", port) - // pattern = "%s://%s/%s?%s" - // urlString = fmt.Sprintf(pattern, protocol, host, r.URL.Path, r.URL.RawQuery) } if r.URL.Path != "" { url += r.URL.Path } if r.URL.RawQuery != "" { url += fmt.Sprintf("?%s", r.URL.RawQuery) - // pattern = "%s://%s:%s/%s" - // urlString = fmt.Sprintf(pattern, protocol, host, port, r.URL.Path) - // if port == "" { - // pattern = "%s://%s/%s" - // urlString = fmt.Sprintf(pattern, protocol, host, r.URL.Path) - // } } return url }