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

httpcaddyfile: Support compression in http transport config #3624

Merged
merged 2 commits into from
Jul 31, 2020
Merged

httpcaddyfile: Support compression in http transport config #3624

merged 2 commits into from
Jul 31, 2020

Conversation

Vigilans
Copy link
Contributor

@Vigilans Vigilans commented Jul 31, 2020

I have successfully established h2c connection between caddy and my local service with the commits in #3561.

But the json config in #3556 (comment) cannot be simply ported to caddyfile because of the absence of compression field in reverse_proxy -> transport http config. This PR is just a minor modification to make this field available to caddyfile's http transport config.

Config example:

    transport http {
      versions h2c 2
      compression off
    }

Copy link
Member

@francislavoie francislavoie left a comment

Choose a reason for hiding this comment

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

For reference, the HTTP transport in JSON config has the compression field here: https://caddyserver.com/docs/json/apps/http/servers/errors/routes/handle/reverse_proxy/transport/http/

modules/caddyhttp/reverseproxy/caddyfile.go Show resolved Hide resolved
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR! I love these contributions that make simple and gradual improvements to the Caddyfile.

@mholt mholt merged commit 6f73a35 into caddyserver:master Jul 31, 2020
@mholt
Copy link
Member

mholt commented Jul 31, 2020

Feel free to contribute again sometime 👍

@mholt mholt added this to the 2.x milestone Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants