From 4c435327d560930c608f34f663f513227c25a666 Mon Sep 17 00:00:00 2001 From: Sarah Lensing Date: Fri, 4 Mar 2016 15:16:32 -0500 Subject: [PATCH] Send DNT header in tangram requests --- .../main/kotlin/com/mapzen/erasermap/model/TileHttpHandler.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/mapzen/erasermap/model/TileHttpHandler.kt b/app/src/main/kotlin/com/mapzen/erasermap/model/TileHttpHandler.kt index 8732a50a..5e1328ce 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/model/TileHttpHandler.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/model/TileHttpHandler.kt @@ -9,6 +9,8 @@ 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 { @@ -16,6 +18,7 @@ public class TileHttpHandler(application: Application) : HttpHandler() { val httpCache = File(application.externalCacheDir.absolutePath + "/tile_cache") setCache(httpCache, 30 * 1024 * 1024) } + okRequestBuilder.addHeader(HEADER_DNT, VALUE_HEADER_DNT) } var apiKey: String? = null