fix : 토큰 인증 수정

This commit is contained in:
qornwh1
2026-03-16 10:22:00 +09:00
parent 3d62cbf58d
commit 2bc01f9c18

View File

@@ -8,7 +8,7 @@ namespace MMOserver.Api;
public class RestApi : Singleton<RestApi>
{
private const string VERIFY_URL = "https://a301.api.tolelom.xyz/api/auth/verify";
private const string VERIFY_URL = "https://a301.api.tolelom.xyz/api/auth/internal/auth/verify";
private readonly HttpClient httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
private const int MAX_RETRY = 3;
@@ -24,6 +24,7 @@ public class RestApi : Singleton<RestApi>
try
{
HttpResponseMessage response = await httpClient.PostAsJsonAsync(VERIFY_URL, new { token });
response.Headers.Add("X-API-Key", token);
// 401: 토큰 자체가 무효 → 재시도해도 같은 결과, 즉시 반환
if (response.StatusCode == HttpStatusCode.Unauthorized)