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

duplicate-headers: prevent some headers from being copied over #321

Merged
merged 1 commit into from May 2, 2013

Conversation

Projects
None yet
2 participants
@oschaaf
Copy link
Member

oschaaf commented May 2, 2013

Amongst other headers, don't copy the "Connection" response-header
when we receive it from psol.

Combined with our config trick[1] to prevent add_header from setting
any other headers should fix
#314 (yet to be confirmed)

[1] location ~ ".pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+" {
add_header "" "";
}

duplicate-headers: prevent some headers from being copied over
Amongst other headers, don't copy the "Connection" response-header
when we receive it from psol.

Combined with our config trick[1] to prevent add_header from setting
any other headers should fix

[1] location ~ ".pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+" {
add_header "" "";
}
@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented May 2, 2013

I wonder whether we should just us a whitelist instead. What are the headers we do want to copy?

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented May 2, 2013

@jeffkaufman "I wonder whether we should just us a whitelist instead. What are the headers we do want to copy?"

The reason I went with blacklisting here, is that we may receive custom headers from our upstream, that it sends out to communicate with something in our downstream. As we don't know what these headers could be, it is hard to whitelist them.

Considering that, what do you think?

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented May 2, 2013

Ok; blacklist LGTM.

jeffkaufman added a commit that referenced this pull request May 2, 2013

Merge pull request #321 from pagespeed/oschaaf-duplicate-headers
duplicate-headers: prevent some headers from being copied over

@jeffkaufman jeffkaufman merged commit 458fe68 into master May 2, 2013

@jeffkaufman jeffkaufman deleted the oschaaf-duplicate-headers branch May 2, 2013

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented May 17, 2013

Released in 1.5.27.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment