Skip to content

Commit 324923c

Browse files
authored
Update app.py
1 parent f8a0e23 commit 324923c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ def dokumentUpload():
626626
def dokumentHent():
627627
try:
628628
cookie = request.headers.get("lectio-cookie")
629+
contentType = request.headers.get("content-type")
629630
id = request.args.get("id")
630631
doctype = request.args.get("doctype")
631632
raw = request.args.get("raw")
@@ -634,7 +635,7 @@ def dokumentHent():
634635
_resp = lectioClient.dokumentHent(id, doctype)
635636
resp = make_response(_resp["content"])
636637
if not raw or raw == "true":
637-
resp.headers["Content-Type"] = _resp["content-type"]
638+
resp.headers["Content-Type"] = contentType if contentType else _resp["content-type"]
638639
resp.headers["Content-Disposition"] = _resp["content-disposition"]
639640
resp.headers["set-lectio-cookie"] = lectioClient.base64Cookie()
640641
resp.headers["Access-Control-Expose-Headers"] = "set-lectio-cookie"

0 commit comments

Comments
 (0)