fix etag
This commit is contained in:
parent
0837886feb
commit
a3d3f3888a
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ def tile(request, level, zoom, x, y, format):
|
|||
# check browser cache
|
||||
etag = '"'+b64_encode(hashlib.sha256(
|
||||
('%d-%d-%d-%d:%s:%s' % (level, zoom, x, y, tile_cache_key, settings.SECRET_TILE_KEY)).encode()
|
||||
).digest())+'"'
|
||||
).digest()).decode()+'"'
|
||||
if_none_match = request.META.get('HTTP_IF_NONE_MATCH')
|
||||
if if_none_match == etag:
|
||||
return HttpResponseNotModified()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue