I am attempting to stream a PDF file created by FPDF. The data for the PDF is generated perfectly and I send the stream back using Flask make_response
setting the headers like this:
response.headers.set('Content-Type', 'application/pdf')
response.headers.set('Content-Disposition', 'inline; filename="ledger.pdf"')
I am using Apache2 mod_wsgi module to host the the API that generates this PDF. My problem is: The PDF stream gets sent to Apache's error log. Am I going about this the wrong way or is there a setting that I am missing in Apache that allows the stream to go back to the client?
My Python version is 3.9 running on Ubuntu Linux Server