From 190368cd09b80b3e3aa00186ac29b8fe64124686 Mon Sep 17 00:00:00 2001 From: youngjinc Date: Wed, 15 May 2024 20:50:03 +0900 Subject: [PATCH] =?UTF-8?q?[chore]=20=ED=97=A4=EB=8D=94=EC=97=90=20User-Ag?= =?UTF-8?q?ent=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wishboard/data/interceptor/AuthInterceptor.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/hyeeyoung/wishboard/data/interceptor/AuthInterceptor.kt b/app/src/main/java/com/hyeeyoung/wishboard/data/interceptor/AuthInterceptor.kt index fa3eb1e2..05b16d29 100644 --- a/app/src/main/java/com/hyeeyoung/wishboard/data/interceptor/AuthInterceptor.kt +++ b/app/src/main/java/com/hyeeyoung/wishboard/data/interceptor/AuthInterceptor.kt @@ -77,10 +77,13 @@ class AuthInterceptor @Inject constructor( private fun Request.newAuthBuilder() = this.newBuilder() - .addHeader(AUTHORIZATION, "$TOKEN_PREF${localStorage.accessToken}") + .addHeader(HEADER_KEY_AUTHORIZATION, "$TOKEN_PREF${localStorage.accessToken}") + .addHeader(HEADER_KEY_USER_AGENT, "$HEADER_VALUE_USER_AGENT_PREF${if (BuildConfig.DEBUG) "dev" else "prod"}") companion object { - private const val AUTHORIZATION = "Authorization" + private const val HEADER_KEY_AUTHORIZATION = "Authorization" + private const val HEADER_KEY_USER_AGENT = "User-Agent" + private const val HEADER_VALUE_USER_AGENT_PREF = "wishboard-android/" private const val TOKEN_PREF = "Bearer " private const val REFRESH_TOKEN = "refreshToken" }