diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72c6053..dc112fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,10 +34,15 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . push: true tags: ${{ steps.meta.outputs.tags }} + platforms: linux/amd64,linux/arm64 labels: ${{ steps.meta.outputs.labels }} diff --git a/src/tools/proxy.go b/src/tools/proxy.go index 139fdbb..734bda3 100644 --- a/src/tools/proxy.go +++ b/src/tools/proxy.go @@ -49,6 +49,7 @@ func ProxyRequestHandler(p *httputil.ReverseProxy) func(http.ResponseWriter, *ht } } +// Handles the response back to the client once intercepted from CodeArtifact func ProxyResponseHandler() func(*http.Response) error { return func(r *http.Response) error { log.Printf("Received %d response from %s", r.StatusCode, r.Request.URL.String()) @@ -80,7 +81,10 @@ func ProxyResponseHandler() func(*http.Response) error { } // Do some quick fixes to the HTTP response for NPM install requests - if strings.HasPrefix(r.Request.UserAgent(), "npm") { + // Also support for pnpm and bun + if strings.HasPrefix(r.Request.UserAgent(), "npm") || + strings.HasPrefix(r.Request.UserAgent(), "pnpm") || + strings.HasPrefix(r.Request.UserAgent(), "Bun") { // Respond to only requests that respond with JSON // There might eventually be additional headers i don't know about?