Skip to content

Commit

Permalink
try with gzip
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardKoschicek committed Sep 25, 2023
1 parent 35b86ef commit 9d6d95e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openatlas/views/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ def getManifest(id_):
@cross_origin()
def iiif_manifest(id_: int):
content = gzip.compress(json.dumps(getManifest(id_)).encode('utf8'), 5)
response = jsonify(content)
response = Response(content)
response.headers['Content-length'] = len(content)
response.headers['Content-Encoding'] = 'gzip'
return response
return jsonify(getManifest(id_))


@app.route('/iiif/<int:id_>', methods=['GET'])
Expand Down

0 comments on commit 9d6d95e

Please sign in to comment.