Golang ReverseProxy with Iris-Go framework
<p>Anybody able to wire Golang's ReverseProxy functionality with Iris-Go web framework. I couldnt make it working. I am able to wire it with regular net/http.</p>

<pre><code>func MultiHostReverseProxy(targets map[string]utils.Service) *httputil.ReverseProxy {
    r := regexp.MustCompile(`\/proxy/(?P&lt;Service&gt;[a-zA-Z_-]*)(?P&lt;Path&gt;\/.*)`)
    director := func(req *http.Request) {
        if strings.HasPrefix(req.URL.Path, "/proxy/") {
            temp := r.FindStringSubmatch(req.URL.Path);
            if (len(temp) &gt; 1) {
                system := temp[1]
                if val, ok := targets[system]; ok {
                    s := val.Host + ":" + val.Port
                    req.URL.Scheme = val.Scheme
                    req.URL.Host = s
                    req.URL.Path = temp[2]

                    if enc, ok := GetAxleHeader(req.Header); ok {
                        dec := utils.Decrypt(KEY, enc)
                        req.Header.Set(val.AuthHeader, dec)
                        req.Header.Set(AXLE_HEADER, "")
                    } else {
                        token, nq := utils.FindAxleToken(req.URL.RawQuery);
                        fmt.Printf("%s -&gt; token : %s    newQuery: %s\n", req.URL.RawQuery, token, nq);
                        if token != "" {
                            req.URL.RawQuery = nq
                            dec := utils.Decrypt(KEY, token)
                            req.Header.Set(val.AuthHeader, dec)
                            req.Header.Set(AXLE_HEADER, "")
                        }
                    }
                }
            }
        }
    }
    return &amp;httputil.ReverseProxy{Director: director}
}
</code></pre>

<p>How can I use this ReverseProxy object with iris framework;</p>