Skip to content

Commit

Permalink
[chore] 헤더에 User-Agent 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjinc committed May 15, 2024
1 parent 184a09f commit 190368c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 190368c

Please sign in to comment.