Skip to content

Commit 5bb62ea

Browse files
author
Andrei Neagu
committed
added secure flag to settings
1 parent 9eeaee9 commit 5bb62ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/settings-library/src/settings_library/docker_api_proxy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ class DockerApiProxysettings(BaseCustomSettings):
1313
DOCKER_API_PROXY_PORT: PortInt = Field(
1414
8888, description="port of the docker-api-proxy service"
1515
)
16+
DOCKER_API_PROXY_SECURE: bool = False
1617

1718
DOCKER_API_PROXY_USER: str | None = None
1819
DOCKER_API_PROXY_PASSWORD: SecretStr | None = None
1920

2021
@cached_property
2122
def base_url(self) -> str:
22-
return f"http://{self.DOCKER_API_PROXY_HOST}:{self.DOCKER_API_PROXY_PORT}"
23+
protocl = "https" if self.DOCKER_API_PROXY_SECURE else "http"
24+
return f"{protocl}://{self.DOCKER_API_PROXY_HOST}:{self.DOCKER_API_PROXY_PORT}"

0 commit comments

Comments
 (0)