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

Add SSLHost logic to ModifyResponseHeaders() #62

Merged
merged 3 commits into from
Nov 14, 2019
Merged

Conversation

dtomcej
Copy link
Contributor

@dtomcej dtomcej commented Nov 12, 2019

This PR:

  • Updates the ModifyResponseHeaders method to modify the scheme of the location header if the following conditions are true:
    • The Request is a TLS request
    • There is an SSLHost defined
    • The Response contains the SSLHost with an http scheme
    • The Response does not contain a port
  • Adds tests to verify that the behaviour is consistent.

Fixes #61

secure.go Outdated Show resolved Hide resolved
secure.go Outdated Show resolved Hide resolved
secure_test.go Show resolved Hide resolved
@unrolled
Copy link
Owner

Looks good to me! Thanks @dtomcej for the PR, and thanks @keesverruijt for reviewing!! I'll tag this merge as v1.0.5.

@unrolled unrolled merged commit 996bc0c into unrolled:v1 Nov 14, 2019
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.

ModifyResponseHeader rewrites response headers indiscriminately
3 participants