正确设置httputil.ReverseProxy Foward响应流

I have reverse proxies in my main web-server that are dedicated to a certain micro-service and handle forward requests to their appropriate micro-services.

func newTrimPrefixReverseProxy(target *url.URL, prefix string) *httputil.ReverseProxy {
    director := func(req *http.Request) {
        // ... trims prefix from request path and prepends the path of the target url
    }

    return &httputil.ReverseProxy{Director: director}
}

This has worked perfectly for pure JSON responses, but I have ran into issues recently when trying to serve content (stream responses) through the reverse proxy. The means for serving the content is irrelevant, the (video) content is served as intended when the service is accessed directly and not through the reverse proxy.

Serving the content:

http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
    http.ServeContent(w, r, "video.mp4", time.Now().Add(time.Hour*24*365*12*9*-1), videoReadSeeker)
})

Again, the videoReadSeeker and how the content is served is not the issue, the issue is having my response relayed as intended to the requester through the reverse proxy; when accessing the service directly, the video shows up and I can scrub it to my heart's content.

Note that the response for data the content is received (http status, headers), but the content stream in the response body is not.

How can I make sure that the reverse proxy handles streamed responses as intended for the content?

Do you get the same results when using:

package main

import (
    "log"
    "net/http"
    "net/http/httputil"
    "net/url"
)

func main() {
    u, err := url.Parse("http://localhost:8080/asdfasdf")
    if err != nil {
        log.Fatal("url.Parse: %v", err)
    }

    proxy := httputil.NewSingleHostReverseProxy(u)

    log.Printf("Listening at :8081")
    if err := http.ListenAndServe(":8081", proxy); err != nil {
        log.Fatal("ListenAndServe: %v", err)
    }
}

Ultimately these are the same implementation under the hood, but the director provided here ensures that some of the expected headers exist that you will need for some proxy features to function as expected.