Tags: gorilla/handlers
Tags
update GitHub workflows (#251) <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. For a timely review/response, please avoid force-pushing additional commits if your PR already received reviews or comments. Before submitting a Pull Request, please ensure that you have: - 📖 Read the Contributing guide: https://github.com/gorilla/.github/blob/main/CONTRIBUTING.md - 📖 Read the Code of Conduct: https://github.com/gorilla/.github/blob/main/CODE_OF_CONDUCT.md - Provide tests for your changes. - Use descriptive commit messages. - Comment your code where appropriate. - Squash your commits - Update any related documentation. - Add gorilla/pull-request-reviewers as a Reviewer --> ## What type of PR is this? (check all applicable) - [x] Refactor - [ ] Feature - [ ] Bug Fix - [ ] Optimization - [ ] Documentation Update - [ ] Go Version Update - [ ] Dependency Update ## Description ## Related Tickets & Documents <!-- For pull requests that relate or close an issue, please include them below. We like to follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue. --> - Related Issue # - Closes # ## Added/updated tests? - [ ] Yes - [ ] No, and this is why: _please replace this line with details on why tests have not been included_ - [ ] I need help with writing tests ## Run verifications and test - [x] `make verify` is passing - [x] `make test` is passing
Fix compression of *os.Files. (#197) After using httpsnoop to preserve interfaces, the compress response writer now implemented ReaderFrom. ReaderFrom is used by net/http to use sendfile when serving *os.Files. This breaks compression because it serves directly to the underlying response writer, skipping the compressor. Fix by implementing ReadFrom on our resposne writer to copy to our compressor. Fixes #194.
added ability to register custom log formatter (#131) * added ability to register custom log formatter * changed function type declaration to work on older versions of Go * changed to an args struct per PR, refactored logging tests to make it easier to see the scenarios * fixed formatting and linting issues * split logging into its own file * removed writer from the LogFormatterParams struct * split all logging tests into a separate file * fixed formatting
[bugfix] Don't return the origin header when configured to * (#116) There's no reason to allow for a server to reflect all origin headers. This has caused numerous security problems in the past. - cyu/rack-cors#126 - https://nodesecurity.io/advisories/148 - captncraig/cors@cc1cf75 Some helpful blog posts on the topic: - https://ejj.io/misconfigured-cors/ - http:https://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html