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/07 09:43:46 UTC
[GitHub] [apisix] zuiyangqingzhou opened a new pull request, #9024: feat(gzip): add via control option in gzip plugin
zuiyangqingzhou opened a new pull request, #9024:
URL: https://github.com/apache/apisix/pull/9024
### Description
<!-- Please include a summary of the change and which issue is fixed. -->
<!-- Please also include relevant motivation and context. -->
Fixes # (https://github.com/apache/apisix/issues/8995)
### Checklist
- [ ] I have explained the need for this PR and the problem it solves
- [ ] I have explained the changes or the new features added to this PR
- [ ] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
<!--
Note
1. Mark the PR as draft until it's ready to be reviewed.
2. Always add/update tests for any changes unless you have a good reason.
3. Always update the documentation to reflect the changes made in the PR.
4. Make a new commit to resolve conversations instead of `push -f`.
5. To resolve merge conflicts, merge master instead of rebasing.
6. Use "request review" to notify the reviewer after making changes.
7. Only a reviewer can mark a conversation as resolved.
-->
--
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
[GitHub] [apisix] spacewander commented on a diff in pull request #9024: feat(gzip): add via control option in gzip plugin
Posted by "spacewander (via GitHub)" <gi...@apache.org>.
spacewander commented on code in PR #9024:
URL: https://github.com/apache/apisix/pull/9024#discussion_r1131875531
##########
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:
If this can satisfy your requirement, why not just use proxy-rewrite plugin to do so?
--
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
Re: [PR] feat(gzip): add via control option in gzip plugin [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9024:
URL: https://github.com/apache/apisix/pull/9024#issuecomment-1859102538
This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
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
[GitHub] [apisix] zuiyangqingzhou commented on pull request #9024: feat(gzip): add via control option in gzip plugin
Posted by "zuiyangqingzhou (via GitHub)" <gi...@apache.org>.
zuiyangqingzhou commented on PR #9024:
URL: https://github.com/apache/apisix/pull/9024#issuecomment-1459931680
The ci error may not be caused by me.
--
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
Re: [PR] feat(gzip): add via control option in gzip plugin [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #9024: feat(gzip): add via control option in gzip plugin
URL: https://github.com/apache/apisix/pull/9024
--
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
Re: [PR] feat(gzip): add via control option in gzip plugin [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9024:
URL: https://github.com/apache/apisix/pull/9024#issuecomment-1817465276
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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
[GitHub] [apisix] zuiyangqingzhou commented on a diff in pull request #9024: feat(gzip): add via control option in gzip plugin
Posted by "zuiyangqingzhou (via GitHub)" <gi...@apache.org>.
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