deis / router

Edge router for Deis Workflow
https://deis.com
MIT License
80 stars 57 forks source link

feat(*): add configurable server_tokens nginx setting, tests refactoring #209

Closed gerred closed 8 years ago

gerred commented 8 years ago

There are two significant changes to this PR. I'm marking this as in progress and to start a conversation:

1) Add a server_tokens configurable field to for the nginx conf. This enables users to disable the Server response header field as documented here.

2) Begin adding tests to the nginx module. This will involve a refactoring of the module to allow dependency injection and converting to use writers/buffers rather than directly writing files. This'll also harden the codebase and allow testability. Right now, these changes are encapsulated in the test file, but the intent is to refactor both model and nginx packages to support testability.

Changes I'd like to make:

deis-bot commented 8 years ago

@krancour and @helgi are potential reviewers of this pull request based on my analysis of git blame information. Thanks @gerred!

arschles commented 8 years ago

@gerred IMO this is a great start. A few ideas, inline with each TODO:

Also, one final note about the template - if you're willing to take on a larger refactor, you could represent the template in Go code. There are 2 options I can think of to do so:

Either one of those options could potentially help you get to 100% coverage on template options.

krancour commented 8 years ago

I'm not opposed to any of what's been proposed, but also think that any refactor should be separate from the PR adding support for an additional option (server_tokens).

gerred commented 8 years ago

Agreed. I'm happy to leave this PR as is and then open a new working PR to start the other items.

krancour commented 8 years ago

If the proposal can be separated from this feature, then, for me, only https://github.com/deis/router/pull/209#discussion_r68299813 is blocking this feature from being merged my LGTM.

gerred commented 8 years ago

Working on that today! I'll create it as a defaultRouterConfig.

mboersma commented 8 years ago

@gerred is this still in progress or should we close it?

bacongobbler commented 8 years ago

going to close this as inactive. @gerred please feel free to re-open if you feel like taking a crack at this again. Thanks!