All Versions
7
Latest Version
Avg Release Cycle
425 days
Latest Release
1607 days ago

Changelog History

  • v2.0.2 Changes

    July 17, 2020

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed Go module name for v2
  • v2.0.1 Changes

    May 25, 2020

    ๐Ÿ›  Fixed

    • Recovery middleware now checks that Formatter is not nil before calling
  • v2.0.0 Changes

    May 25, 2020

    ๐Ÿ”„ Changed

    • ๐Ÿ–จ Recovery.PrintStack, when false, now also supresses the panic message in addition to supressing the stack trace

    ๐Ÿ›  Fixed

    • Negroni.With() now copies handlers to avoid mutating the original Negroni instance if Use is called on the new Negroni instance

    โž• Added

    • ๐Ÿ”Š Recovery.LogStack was added to control whether the stacktrace is logged for panics

    ๐Ÿ”„ Changed

  • v1.0.0 Changes

    September 01, 2018

    ๐Ÿ›  Fixed

    • Logger middleware now correctly handles paths containing a % instead of trying to treat it as a format specifier
  • v0.3.0 Changes

    November 11, 2017

    โž• Added

    • ๐Ÿ— With() helper for building a new Negroni struct chaining handlers from
      existing Negroni structs
    • ๐Ÿ”ง Format log output in Logger middleware via a configurable text/template
      0๏ธโƒฃ string injectable via .SetFormat. Added LoggerDefaultFormat and
      ๐Ÿ”ง LoggerDefaultDateFormat to configure the default template and date format
      ๐Ÿ‘‰ used by the Logger middleware.
    • ๐Ÿ‘Œ Support for HTTP/2 pusher support via http.Pusher interface for Go 1.8+.
    • WrapFunc to convert http.HandlerFunc into a negroni.Handler
    • ๐Ÿ”ง Formatter field added to Recovery middleware to allow configuring how
      0๏ธโƒฃ panics are output. Default of TextFormatter (how it was output in
      0.2.0) used. HTMLPanicFormatter also added to allow easy outputing of
      panics as HTML.

    ๐Ÿ›  Fixed

    • Written() correct returns false if no response header has been written
    • Only implement http.CloseNotifier with the negroni.ResponseWriter if the
      underlying http.ResponseWriter implements it (previously would always
      implement it and panic if the underlying http.ResponseWriter did not.

    ๐Ÿ”„ Changed

    • 0๏ธโƒฃ Set default status to 0 in the case that no handler writes status -- was
      previously 200 (in 0.2.0, before that it was 0 so this reestablishes that
      behavior)
    • Catch panics thrown by callbacks provided to the Recovery handler
    • Recovery middleware will set text/plain content-type if none is set
    • ALogger interface to allow custom logger outputs to be used with the
      Logger middleware. Changes embeded field in negroni.Logger from Logger
      to ALogger.
    • 0๏ธโƒฃ Default Logger middleware output changed to be more structure and verbose
      ๐Ÿ‘€ (also now configurable, see Added)
    • Automatically bind to port specified in $PORT in .Run() if an address is
      not passed in. Fall back to binding to :8080 if no address specified
      0๏ธโƒฃ (configuable via DefaultAddress).
    • โœจ PanicHandlerFunc added to Recovery middleware to enhance custom handling
      of panics by providing additional information to the handler including the
      stack and the http.Request. Recovery.ErrorHandlerFunc was also added, but
      ๐Ÿ—„ deprecated in favor of the new PanicHandlerFunc.
  • v0.2.0 Changes

    May 10, 2016

    โž• Added

    • ๐Ÿ‘Œ Support for variadic handlers in New()
    • โž• Added Negroni.Handlers() to fetch all of the handlers for a given chain
    • ๐Ÿ‘ Allowed size in Recovery handler was bumped to 8k
    • Negroni.UseFunc to push another handler onto the chain

    ๐Ÿ”„ Changed

    • Set the status before calling beforeFuncs so the information is available to them
    • 0๏ธโƒฃ Set default status to 200 in the case that no handler writes status -- was previously 0
    • Panic if nil handler is given to negroni.Use
  • v0.1.0 Changes

    July 22, 2013

    โž• Added

    • ๐ŸŽ‰ Initial implementation.

    ๐Ÿš€ [Unreleased]: https://github.com/urfave/negroni/compare/v0.2.0...HEAD