You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "zuiyangqingzhou (via GitHub)" <gi...@apache.org> on 2023/03/10 02:57:41 UTC

[GitHub] [apisix] zuiyangqingzhou commented on a diff in pull request #9024: feat(gzip): add via control option in gzip plugin

zuiyangqingzhou commented on code in PR #9024:
URL: https://github.com/apache/apisix/pull/9024#discussion_r1131899710


##########
apisix/plugins/gzip.lua:
##########
@@ -100,6 +104,14 @@ function _M.check_schema(conf)
 end
 
 
+function _M.rewrite(conf, ctx)
+    if conf.disable_via == true then
+        -- According to nginx source code, via header will cause gzip not work
+        core.request.set_header(ctx, "via", nil)

Review Comment:
   I just think that this is a control that the gzip plugin lacks, and there is no need to introduce additional plugins. (of course, proxy-rewrite can also be implemented)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org