mirror of https://github.com/portainer/portainer
refactor(api): introduce ExtensionServer constant
parent
b3c7c76be2
commit
7a8a54c96a
|
@ -92,7 +92,7 @@ func (manager *Manager) GetExtensionProxy(extensionID portainer.ExtensionID) htt
|
||||||
// CreateExtensionProxy creates a new HTTP reverse proxy for an extension and
|
// CreateExtensionProxy creates a new HTTP reverse proxy for an extension and
|
||||||
// registers it in the extension map associated to the specified extension identifier
|
// registers it in the extension map associated to the specified extension identifier
|
||||||
func (manager *Manager) CreateExtensionProxy(extensionID portainer.ExtensionID) (http.Handler, error) {
|
func (manager *Manager) CreateExtensionProxy(extensionID portainer.ExtensionID) (http.Handler, error) {
|
||||||
address := "http://localhost:" + extensionPorts[extensionID]
|
address := "http://" + portainer.ExtensionServer + ":" + extensionPorts[extensionID]
|
||||||
|
|
||||||
extensionURL, err := url.Parse(address)
|
extensionURL, err := url.Parse(address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -876,6 +876,8 @@ const (
|
||||||
PortainerAgentSignatureMessage = "Portainer-App"
|
PortainerAgentSignatureMessage = "Portainer-App"
|
||||||
// SupportedDockerAPIVersion is the minimum Docker API version supported by Portainer
|
// SupportedDockerAPIVersion is the minimum Docker API version supported by Portainer
|
||||||
SupportedDockerAPIVersion = "1.24"
|
SupportedDockerAPIVersion = "1.24"
|
||||||
|
// ExtensionServer represents the server used by Portainer to communicate with extensions
|
||||||
|
ExtensionServer = "localhost"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in New Issue