Skip to content

Commit

Permalink
add: 헤더에 유저 에이전트 추가 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjinc committed Apr 17, 2024
1 parent e8ac425 commit bbe728b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ class AuthInterceptor @Inject constructor(

private fun Request.newAuthBuilder() =
this.newBuilder().addHeader(AUTHORIZATION, "$TOKEN_PREF${localStorage.accessToken}")
.addHeader(USER_AGENT, "wishboard-android/${if (BuildConfig.DEBUG) "dev" else "prod"}")

companion object {
private const val AUTHORIZATION = "Authorization"
private const val USER_AGENT = "User Agent"
private const val TOKEN_PREF = "Bearer "
private const val REFRESH_TOKEN = "refreshToken"
}
Expand Down

0 comments on commit bbe728b

Please sign in to comment.