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

sso-proxy: refactor reverse proxy into separate file w/ tests #188

Merged
merged 2 commits into from
May 22, 2019

Conversation

jphines
Copy link
Contributor

@jphines jphines commented May 7, 2019

Problem

Refactor reverse proxy and upstream into separate file w/ tests. Cleans up some of the reverse proxy logic.

This should make it easier to test reverse proxy specific features/changes in the future and help isolate the reverse proxy from the authentication/authorization portions of sso.

A split out from #187

@jphines jphines self-assigned this May 7, 2019
@jphines jphines force-pushed the sso-refactor-reverseproxy branch 3 times, most recently from fb84b74 to 5af96bd Compare May 20, 2019 15:12
@jphines jphines force-pushed the sso-refactor-reverseproxy branch 2 times, most recently from 9523d52 to 09df2b1 Compare May 21, 2019 22:09
Jusshersmith
Jusshersmith previously approved these changes May 22, 2019
Copy link
Contributor

@Jusshersmith Jusshersmith left a comment

Choose a reason for hiding this comment

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

This looks great @jphines!

shrayolacrayon
shrayolacrayon previously approved these changes May 22, 2019
Copy link

@shrayolacrayon shrayolacrayon left a comment

Choose a reason for hiding this comment

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

this lgtm!

}

if config.FlushInterval != 0 {
reverseProxy.FlushInterval = config.FlushInterval

Choose a reason for hiding this comment

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

do we have a default reverse proxy flush interval?

Copy link
Contributor Author

@jphines jphines May 22, 2019

Choose a reason for hiding this comment

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

We don't. 0 specifies no periodic flushing according to https://golang.org/pkg/net/http/httputil/ which is fine default behavior imho

return handler, nil
}

// Director implements the Director func providerd in the httputil reverse proxy.

Choose a reason for hiding this comment

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

providerd -> provided

}

// Director implements the Director func providerd in the httputil reverse proxy.
// This implements a variety fo director behavior based on configuration defined

Choose a reason for hiding this comment

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

fo -> of

@jphines jphines force-pushed the sso-refactor-reverseproxy branch from fb05af4 to 4d788a6 Compare May 22, 2019 20:05
@jphines jphines merged commit 66ed9e6 into master May 22, 2019
@jphines jphines deleted the sso-refactor-reverseproxy branch August 1, 2019 17:03
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.

None yet

3 participants