This commit is contained in:
2026-05-26 16:04:37 +07:00
parent 8ceb1bb1df
commit 13765e58d2
5 changed files with 25 additions and 15 deletions

View File

@@ -17,7 +17,7 @@ def _default_allowed_download_hosts(base_url: str) -> list[str]:
parsed = urlparse(base_url)
if parsed.hostname:
return [parsed.hostname]
return ["robot.package"]
return ["package.pnkr.cloud"]
@dataclass(frozen=True)
@@ -49,7 +49,7 @@ def _bool(name: str, default: bool) -> bool:
@lru_cache(maxsize=1)
def get_settings() -> Settings:
robot_package_base_url = os.getenv("ROBOT_PACKAGE_BASE_URL", "https://robot.package").rstrip("/")
robot_package_base_url = os.getenv("ROBOT_PACKAGE_BASE_URL", "https://package.pnkr.cloud").rstrip("/")
return Settings(
agent_version=os.getenv("AGENT_VERSION", "1.0.0"),
host=os.getenv("AGENT_HOST", "127.0.0.1"),
@@ -57,7 +57,7 @@ def get_settings() -> Settings:
robot_package_base_url=robot_package_base_url,
allowed_origins=_csv(
os.getenv("ALLOWED_ORIGINS"),
["https://robot.installer", "http://localhost:3000", "http://localhost:5173"],
["https://app.pnkr.cloud", "https://package.pnkr.cloud", "http://localhost:3000", "http://localhost:5173"],
),
allowed_download_hosts=_csv(
os.getenv("ALLOWED_DOWNLOAD_HOSTS"),

View File

@@ -55,9 +55,9 @@ cat > "${BUILD_DIR}/etc/local-installer-agent/agent.env" <<EOF
AGENT_VERSION=${VERSION}
AGENT_HOST=127.0.0.1
AGENT_PORT=5010
ROBOT_PACKAGE_BASE_URL=https://robot.package
ALLOWED_ORIGINS=https://robot.installer,http://localhost:3000,http://localhost:5173
ALLOWED_DOWNLOAD_HOSTS=robot.package
ROBOT_PACKAGE_BASE_URL=https://package.pnkr.cloud
ALLOWED_ORIGINS=https://app.pnkr.cloud,https://package.pnkr.cloud,http://localhost:3000,http://localhost:5173
ALLOWED_DOWNLOAD_HOSTS=package.pnkr.cloud
ALLOWED_DOCKER_REGISTRIES=registry.robot.package
CACHE_DIR=/var/cache/local-installer-agent/packages
APP_DIR=/opt/robot-apps