rust-rpxy icon indicating copy to clipboard operation
rust-rpxy copied to clipboard

How to set the customized header for response?

Open xmh0511 opened this issue 1 year ago • 4 comments

In caddy, for example, we can add some headers to response

example.com {
    header {
      Cache-Control "no-cache, no-store, must-revalidate"
   }
}

I didn't find a way to configure the header in rpxy. Moreover, how do I enable gzip for an application?

xmh0511 avatar Aug 01 '24 02:08 xmh0511

rpxy doesn't provide such functionality at this point.

In the current rpxy's design principle (as simple as possible), application-specific header fields including gzip for e2e compression should be controlled by backend applications. rpxy focuses not on the duty of web servers but on tasks of reverse proxy, e.g., TLS termination, routing requests to backend apps, etc.

junkurihara avatar Aug 01 '24 03:08 junkurihara

rpxy doesn't provide such functionality at this point.

In the current rpxy's design principle (as simple as possible), application-specific header fields including gzip for e2e compression should be controlled by backend applications. rpxy focuses not on the duty of web servers but on tasks of reverse proxy, e.g., TLS termination, routing requests to backend apps, etc.

AFAIK, nginx and caddy both support these functionalities. Does rpxy plan to support these functionalities the other alternatives has supported?

xmh0511 avatar Aug 01 '24 03:08 xmh0511

AFAIK, nginx and caddy both support these functionalities. Does rpxy plan to support these functionalities the other alternatives has supported?

If I need or get convinced, I (or other contributors) will do that.

junkurihara avatar Aug 01 '24 03:08 junkurihara

rpxy doesn't provide such functionality at this point. In the current rpxy's design principle (as simple as possible), application-specific header fields including gzip for e2e compression should be controlled by backend applications. rpxy focuses not on the duty of web servers but on tasks of reverse proxy, e.g., TLS termination, routing requests to backend apps, etc.

AFAIK, nginx and caddy both support these functionalities. Does rpxy plan to support these functionalities the other alternatives has supported?

nginx and caddy are both webserver and not primarily reverse-proxies, thus I see this oos for rpxy.

Gamerboy59 avatar Aug 01 '24 13:08 Gamerboy59