Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gzip): add via control option in gzip plugin #9024

Closed
wants to merge 1 commit into from

Conversation

zuiyangqingzhou
Copy link
Contributor

@zuiyangqingzhou zuiyangqingzhou commented Mar 7, 2023

Description

Fixes #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 first)

@zuiyangqingzhou
Copy link
Contributor Author

zuiyangqingzhou commented Mar 8, 2023

The CI error may not be caused by me.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this can satisfy your requirement, why not just use proxy-rewrite plugin to do so?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link

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.

@github-actions github-actions bot added the stale label Nov 18, 2023
Copy link

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.

@github-actions github-actions bot closed this Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: The gzip plugin does not work in special scenarios
2 participants