title: How to bypass integrity checks through proxy
body: <p>I have a Go proxy server which will proxy the incoming requests to a different nginx service, where a bunch of static files generated from hugo are deployed. The Go proxy server code is:</p>
  
  <pre><code>func (w http.ResponseWriter, r *http.Request) {
      proxy := httputil.NewSingleHostReverseProxy(target)
      proxy.Transport = debug.Transport{} // Set some Debug TCP options here
      proxy.ServeHTTP(w, r)
  }
  </code></pre>
  
  <p>The <code>debug.Transport</code> is created like below:</p>
  
  <pre><code>type Transport struct {
      Transport http.RoundTripper
  }
  
  func (d Transport) RoundTrip(r *http.Request) (*http.Response, error) {
      fmt.Println(r.Header)
      d.Transport = &amp;http.Transport{
          TLSClientConfig: &amp;tls.Config{InsecureSkipVerify: true},
      }
      return d.Transport.RoundTrip(r)
  }
  </code></pre>
  
  <p>In the debug Transport, I am already ignoring the certificate checks for TLS configuration.</p>
  
  <p>If I directly access the nginx url where hugo static files are served, then the static files are perfectly loaded. The static files are served fine even if I access from an nginx-ingress in addition to the nginx. However, when the requests are served via the Go proxy, then I get an error:</p>
  
  <pre><code>Failed to find a valid digest in the 'integrity' attribute for resource 'https://&lt;blah&gt;/js/main.min.29b0315468c00226fa6f4556a9cebc0ac4fe1ce1457a01b22c0a06b329877383.js' with computed SHA-256 integrity 'Nk/s9htIgKJ5jeLFxUMWgIQGhxGZBKoEWtWEy2qYtJk='. The resource has been blocked.
  </code></pre>
  
  <p>Any idea how I can skip these <code>integerity</code> check in the Go http proxy ?</p>