Need to forward income request to different ports on localhost due to limitation

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:

1 Like