mirror of
https://github.com/dyzulk/trustlab-api.git
synced 2026-01-26 21:32:08 +07:00
Fix: Replace hardcoded pki url with config('app.url')
This commit is contained in:
@@ -56,7 +56,7 @@ class CaInstallerService
|
|||||||
")\r\n" .
|
")\r\n" .
|
||||||
"call :printSuccess \"Certificate installed successfully!\"\r\n" .
|
"call :printSuccess \"Certificate installed successfully!\"\r\n" .
|
||||||
"\r\n" .
|
"\r\n" .
|
||||||
"powershell -Command \"Invoke-WebRequest -Uri 'https://pki.trustlab.local/api/public/ca-certificates/{$cert->serial_number}/track' -Method POST -ErrorAction SilentlyContinue\" >nul 2>&1\r\n" .
|
"powershell -Command \"Invoke-WebRequest -Uri '" . config('app.url') . "/api/public/ca-certificates/{$cert->serial_number}/track' -Method POST -ErrorAction SilentlyContinue\" >nul 2>&1\r\n" .
|
||||||
"\r\n" .
|
"\r\n" .
|
||||||
"del \"%TEMP_CERT%\"\r\n" .
|
"del \"%TEMP_CERT%\"\r\n" .
|
||||||
"echo.\r\n" .
|
"echo.\r\n" .
|
||||||
@@ -204,7 +204,7 @@ class CaInstallerService
|
|||||||
"msg_info \"Updating certificate store...\"\n" .
|
"msg_info \"Updating certificate store...\"\n" .
|
||||||
"if \$UPDATE_CMD >/dev/null 2>&1; then\n" .
|
"if \$UPDATE_CMD >/dev/null 2>&1; then\n" .
|
||||||
" msg_ok \"Store updated successfully.\"\n" .
|
" msg_ok \"Store updated successfully.\"\n" .
|
||||||
" curl -X POST -s \"https://pki.trustlab.local/api/public/ca-certificates/{$cert->serial_number}/track\" >/dev/null 2>&1\n" .
|
" curl -X POST -s \"" . config('app.url') . "/api/public/ca-certificates/{$cert->serial_number}/track\" >/dev/null 2>&1\n" .
|
||||||
"else\n" .
|
"else\n" .
|
||||||
" msg_err \"Failed to update certificate store.\"\n" .
|
" msg_err \"Failed to update certificate store.\"\n" .
|
||||||
" exit 1\n" .
|
" exit 1\n" .
|
||||||
@@ -383,7 +383,7 @@ class CaInstallerService
|
|||||||
$shContent .= "msg_info \"Processing: {$cert->common_name}\"\n";
|
$shContent .= "msg_info \"Processing: {$cert->common_name}\"\n";
|
||||||
$shContent .= "curl -sL \"{$cdnUrl}\" -o \"\$TARGET_DIR/{$filename}\"\n";
|
$shContent .= "curl -sL \"{$cdnUrl}\" -o \"\$TARGET_DIR/{$filename}\"\n";
|
||||||
// Telemetry Ping (Silent)
|
// Telemetry Ping (Silent)
|
||||||
$shContent .= "curl -X POST -s \"https://pki.trustlab.local/api/public/ca-certificates/{$cert->serial_number}/track\" >/dev/null 2>&1\n";
|
$shContent .= "curl -X POST -s \"" . config('app.url') . "/api/public/ca-certificates/{$cert->serial_number}/track\" >/dev/null 2>&1\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$shContent .= "\nmsg_info \"Updating certificate store...\"\n" .
|
$shContent .= "\nmsg_info \"Updating certificate store...\"\n" .
|
||||||
@@ -423,7 +423,7 @@ class CaInstallerService
|
|||||||
"call :printAction \"Installing {$cert->common_name}...\"\r\n" .
|
"call :printAction \"Installing {$cert->common_name}...\"\r\n" .
|
||||||
"powershell -Command \"Invoke-WebRequest -Uri '{$cdnUrl}' -OutFile '%TEMP_CERT%'\"\r\n" .
|
"powershell -Command \"Invoke-WebRequest -Uri '{$cdnUrl}' -OutFile '%TEMP_CERT%'\"\r\n" .
|
||||||
"certutil -addstore -f \"{$store}\" \"%TEMP_CERT%\" >nul 2>&1\r\n" .
|
"certutil -addstore -f \"{$store}\" \"%TEMP_CERT%\" >nul 2>&1\r\n" .
|
||||||
"powershell -Command \"Invoke-WebRequest -Uri 'https://pki.trustlab.local/api/public/ca-certificates/{$cert->serial_number}/track' -Method POST -ErrorAction SilentlyContinue\" >nul 2>&1\r\n" .
|
"powershell -Command \"Invoke-WebRequest -Uri '" . config('app.url') . "/api/public/ca-certificates/{$cert->serial_number}/track' -Method POST -ErrorAction SilentlyContinue\" >nul 2>&1\r\n" .
|
||||||
"del \"%TEMP_CERT%\"\r\n";
|
"del \"%TEMP_CERT%\"\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user