Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 3eea62a

Browse files
author
Mangled Deutz
committed
Fix #382
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <[email protected]> (github: dmp42)
1 parent 6a6a3e1 commit 3eea62a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docker_registry/toolkit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,15 @@ def response(data=None, code=200, headers=None, raw=False):
8282
data = True
8383
h = {
8484
'Cache-Control': 'no-cache',
85-
'Pragma': 'no-cache',
8685
'Expires': '-1',
8786
'Content-Type': 'application/json'
8887
}
8988
if headers:
9089
h.update(headers)
90+
91+
if h['Cache-Control'] == 'no-cache':
92+
h['Pragma'] = 'no-cache'
93+
9194
try:
9295
if raw is False:
9396
data = json.dumps(data, sort_keys=True, skipkeys=True)

0 commit comments

Comments
 (0)