Skip to content

Commit

Permalink
Merge pull request #454 from mapzen/428-add-dnt-header-tangram
Browse files Browse the repository at this point in the history
Send DNT header in tangram requests
  • Loading branch information
ecgreb committed Mar 4, 2016
2 parents c63d175 + 4c43532 commit 68b22c4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ import java.io.File
public class TileHttpHandler(application: Application) : HttpHandler() {
companion object {
@JvmStatic val KITKAT = 19
@JvmStatic val HEADER_DNT = "DNT"
@JvmStatic val VALUE_HEADER_DNT = "1"
}

init {
if (Build.VERSION.SDK_INT >= KITKAT) {
val httpCache = File(application.externalCacheDir.absolutePath + "/tile_cache")
setCache(httpCache, 30 * 1024 * 1024)
}
okRequestBuilder.addHeader(HEADER_DNT, VALUE_HEADER_DNT)
}

var apiKey: String? = null
Expand Down

0 comments on commit 68b22c4

Please sign in to comment.