fix: FlowTester 스텝 헤더가 기본 Bearer 토큰보다 우선하도록 수정

- 문제: .env의 FLOW_TESTER_API_TOKEN이 스텝에서 설정한 Authorization 헤더를 덮어씀
- 원인: withToken()이 항상 호출되어 스텝 헤더를 무시함
- 해결: 스텝 헤더에 Authorization이 있으면 기본 Bearer 토큰 사용 안함
This commit is contained in:
2025-12-03 20:14:03 +09:00
parent 2846d6c034
commit 793f4a8319

View File

@@ -130,8 +130,8 @@ public function request(string $method, string $endpoint, array $options = []):
$request = $request->withHeaders(['X-API-KEY' => $this->apiKey]);
}
// Bearer 토큰 추가
if ($this->bearerToken) {
// Bearer 토큰 추가 (스텝 헤더에 Authorization이 없는 경우에만)
if ($this->bearerToken && ! isset($headers['Authorization'])) {
$request = $request->withToken($this->bearerToken);
}