Skip to content

Commit

Permalink
feat: Return Weasyprint and Python versions in header (#19)
Browse files Browse the repository at this point in the history
Refs: #DEV-11775

Co-authored-by: Adam Ruberti <[email protected]>
  • Loading branch information
nirikash and ariwk authored Jun 11, 2024
1 parent 5d7baf7 commit 7a7ef22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/WeasyprintController.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def convert_html():

response = Response(output_pdf, mimetype="application/pdf", status=200)
response.headers.add("Content-Disposition", "attachment; filename=" + file_name)
response.headers.add("Weasyprint-Version", weasyprint.__version__)
response.headers.add("Python-Version", platform.python_version())
return response

except AssertionError as e:
Expand Down

0 comments on commit 7a7ef22

Please sign in to comment.