diff --git a/app/Models/LoginToken.php b/app/Models/LoginToken.php index 6c9f36b4..23a146a1 100644 --- a/app/Models/LoginToken.php +++ b/app/Models/LoginToken.php @@ -51,11 +51,14 @@ public static function createForUser(int $userId): self /** * DEV 사이트 자동 로그인 URL 생성 + * 현재 도메인에서 'mng'를 'dev'로 변경하여 동적 생성 */ public function getAutoLoginUrl(): string { - $devAppUrl = config('services.dev.app_url', 'https://dev.sam.kr'); + $currentHost = request()->getHost(); // mng.sam.kr 또는 mng.codebridge-x.com + $devHost = str_replace('mng.', 'dev.', $currentHost); + $scheme = request()->getScheme(); // http 또는 https - return "{$devAppUrl}/auto-login?token={$this->token}"; + return "{$scheme}://{$devHost}/auto-login?token={$this->token}"; } } diff --git a/database/data/flow-tester/items-bom.json b/database/data/flow-tester/items-bom.json index 51413f01..b948e372 100644 --- a/database/data/flow-tester/items-bom.json +++ b/database/data/flow-tester/items-bom.json @@ -6,7 +6,7 @@ "tags": ["items", "bom"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false }, diff --git a/database/data/flow-tester/items-crud.json b/database/data/flow-tester/items-crud.json index b7988953..717bf033 100644 --- a/database/data/flow-tester/items-crud.json +++ b/database/data/flow-tester/items-crud.json @@ -6,7 +6,7 @@ "tags": ["items", "crud", "faker"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false, "headers": { diff --git a/database/data/flow-tester/items-search.json b/database/data/flow-tester/items-search.json index 4b8959bb..7042ae63 100644 --- a/database/data/flow-tester/items-search.json +++ b/database/data/flow-tester/items-search.json @@ -6,7 +6,7 @@ "tags": ["items", "search", "stats"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false }, diff --git a/docs/API_FLOW_TESTER_DESIGN.md b/docs/API_FLOW_TESTER_DESIGN.md index 9e3a18e3..7b84f37d 100644 --- a/docs/API_FLOW_TESTER_DESIGN.md +++ b/docs/API_FLOW_TESTER_DESIGN.md @@ -63,7 +63,7 @@ ### 2.1 전체 구조 ▼ ┌─────────────────────────────────────────────────────────────────┐ │ External API Server │ -│ (SAM API: sam.kr/api/v1) │ +│ (SAM API: api.sam.kr/api/v1) │ └─────────────────────────────────────────────────────────────────┘ ``` @@ -157,7 +157,7 @@ ### 4.1 플로우 정의 구조 "tags": ["item-master", "integration-test"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": true, "headers": { @@ -712,7 +712,7 @@ ### 7.2 플로우 편집기 │ │ 1 { │ │ │ │ 2 "version": "1.0", │ │ │ │ 3 "config": { │ │ -│ │ 4 "baseUrl": "https://sam.kr/api/v1", │ │ +│ │ 4 "baseUrl": "https://api.sam.kr/api/v1", │ │ │ │ 5 "timeout": 30000 │ │ │ │ 6 }, │ │ │ │ 7 "steps": [ │ │ diff --git a/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php b/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php index c45150b8..e8f57a12 100644 --- a/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php +++ b/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php @@ -190,7 +190,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["item-master", "integration", "full-test"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false, "headers": { @@ -373,7 +373,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- 'item-master-simple': { "version": "1.0", "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": true }, @@ -501,7 +501,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["items", "crud", "faker"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false, "headers": { @@ -616,7 +616,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["items", "search", "stats"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false }, @@ -710,7 +710,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["items", "bom", "integration"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false },