I'm also not a proxy expert but I think the issue here is that you're wrapping everything in jsonify in your responses. That doesn't work here because some of the responses will be HTML instead of JSON.
In general, I'd also recommend a proxy tool over Flask for this use-case. Something like nginx or treafik should be a better tool for the job.
If you're interested in exploring that, you may appreciate Matt's response here: