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:

```
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)
}
```
The debug.Transport is created like below:

```
type Transport struct {
    Transport http.RoundTripper
}

func (d Transport) RoundTrip(r *http.Request) (*http.Response, error) {
    fmt.Println(r.Header)
    d.Transport = &http.Transport{
        TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
    }
    return d.Transport.RoundTrip(r)
}
```

In the debug Transport, I am already ignoring the certificate checks for 
TLS configuration.

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 in my 
browser:

```
Failed to find a valid digest in the 'integrity' attribute for resource 
'https://<blah>/js/main.min.29b0315468c00226fa6f4556a9cebc0ac4fe1ce1457a01b22c0a06b329877383.js'
 
with computed SHA-256 integrity 
'Nk/s9htIgKJ5jeLFxUMWgIQGhxGZBKoEWtWEy2qYtJk='. The resource has been 
blocked.
```


Any idea how I can skip this integerity check in the Go http proxy ? I 
cannot find any TLS Config option for it.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/58f6f4ad-7753-402c-81f0-c7ff35c7fb84%40googlegroups.com.

Reply via email to