Приложение разработано в Kotlin, и я использовал okHttpClient для вызовов API. Я пытаюсь разместить его в магазине игр, но они дают мне проблему уязвимости:
HostnameVerifier
Your app(s) are using an unsafe implementation of the HostnameVerifier interface. You can find more information about how to resolve the issue in this Google Help Center article.
МОЙ КОД:
private val gson = GsonBuilder().setLenient().create()
private var httpLogger = HttpLoggingInterceptor()
.setLevel(HttpLoggingInterceptor.Level.BODY)
private val customClient = OkHttpClient.Builder()
.addInterceptor(httpLogger)
.addInterceptor(ConnectivityInterceptor())
.build()
private val sRetrofitBuilder = Retrofit.Builder()
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.client(customClient)
.addConverterFactory(GsonConverterFactory.create(gson))
.baseUrl(DataUtils.getString(R.string.api_base_url))
.build()
Приложение работает хорошо в отладочной версии, хотя