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

Remove header x-accept-encoding-%s without impacting compressed plugin execution #11834

Open
mirakae opened this issue Oct 29, 2024 · 3 comments
Assignees
Labels
compress compress plugin Support

Comments

@mirakae
Copy link

mirakae commented Oct 29, 2024

Is there any method or possible solution to remove the header x-accept-encoding-%s when the compress plugin is invoked?

x-accept-encoding-ats-ec0001-stg.01.cdp.com: gzip

@shukitchan
Copy link
Contributor

I think you can try to change these lines - https://github.com/apache/trafficserver/blob/master/plugins/compress/misc.cc#L171-L174

And try to add "@" to the "x-accept-encoding-%s" header. This should make the header only visible to ATS and not to the client.

Or you can use header rewrite / lua plugin to remove the header

@bryancall bryancall added the compress compress plugin label Nov 4, 2024
@shukitchan
Copy link
Contributor

Actually I think removing the header may be a bad thing for someone already using the plugin.
We should probably add a configurable to hide this header.

@shukitchan
Copy link
Contributor

Actually you have this header only because you have this in configuration

remove-accept-encoding true

With this option, the plugin saves the original accept-encoding in a separate header as specified in the original description of this issue. Without this line or setting it to false, the separate header will not be there.

Does this fix your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compress compress plugin Support
Projects
None yet
Development

No branches or pull requests

4 participants