1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 13:59:40 +02:00
portainer/api/http/proxy/factory_local.go

26 lines
707 B
Go
Raw Normal View History

// +build !windows
2018-07-20 12:02:06 +03:00
package proxy
import (
"net/http"
portainer "github.com/portainer/portainer/api"
2018-07-20 12:02:06 +03:00
)
func (factory *proxyFactory) newLocalProxy(path string, endpointID portainer.EndpointID) http.Handler {
2018-07-20 12:02:06 +03:00
proxy := &localProxy{}
transport := &proxyTransport{
enableSignature: false,
ResourceControlService: factory.ResourceControlService,
TeamMembershipService: factory.TeamMembershipService,
SettingsService: factory.SettingsService,
RegistryService: factory.RegistryService,
DockerHubService: factory.DockerHubService,
dockerTransport: newSocketTransport(path),
endpointIdentifier: endpointID,
2018-07-20 12:02:06 +03:00
}
proxy.Transport = transport
return proxy
}