Tags: gcstang/handlers
Tags
Fix compression of *os.Files. (gorilla#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 gorilla#194.
Support logger for print stack trace (gorilla#195) Fixes gorilla#171
added ability to register custom log formatter (gorilla#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 * (gorilla… …#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://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
Merge pull request gorilla#94 from pavelnikolov/recovery-logger-inter… …face-instead-of-struct Use logger interface in recovery handler (gorilla#92)
Merge pull request gorilla#63 from saranrapjs/cors-custom-origins [feature] Export OriginValidator for documentation purposes.