Flask, waitress (wsgi), caddy (reverse-proxy) and compression

136 views Asked by At

I know it is frowned upon to ask multiple questions in stackoverflow, but I don't understand enough to break it down.

I am running a flask application behind waitress behind caddy (https). I want to add gzip compression now.

My question is:

  • Who is doing what what? Do I really need waitress if I am using caddy?
  • I found flask-squeeze, and flask-compress. How is this working? Isn't gzip compression a feature in HTTP itself (not the application) that must be negotiated with the client and therefore caddy must be involved? How is this forwarded to flask (through waitress if needed?)
  • What are X-* headers and header forwarding, mentioned here?. Are we just "moving horizontally" across the internet stack (transforming the connection only, not moving up or down the internet stack)?
0

There are 0 answers