github.com/gramework/gramework@v1.8.1-0.20231027140105-82555c9057f5/docs/CHANGELOG.md (about)

     1  # Minor release candidate: 1.7.0-rc3
     2  - Support fasthttp KeepHijackedConns option. See fasthttp docs for more.
     3  - Fix determineHandler bug for reflect handlers.
     4  - `grypto/salt` generator now supports retry if crypto.Reader fails
     5  
     6  # Minor release candidate: 1.7.0-rc2
     7  - `ctx.Sanitize()`, `ctx.Sanitizer()` and `app.SetSanitizerPolicy()` introduced thanks to [bluemonday](https://github.com/microcosm-cc/bluemonday).
     8    See `third_party_licenses/bluemonday` for bluemonday's license.
     9  
    10  # Minor release candidate: 1.7.0-rc1
    11  - The `Behind` interface, that should allow proper IP detection as soon as you provide
    12    proper unwrapper.
    13  - First `Behind` unwrapper for [Akamai](https://akamai.com/).
    14    **NOTE**: they do not provide support for that unwrapper.
    15    If you have any bugs, please contact our support or open an issue.
    16  - When registering route, in the handler path `github.com/gramework/gramework/` replaced
    17    with `#gramework` for short.
    18  
    19  # Patch release: 1.6.2
    20  - Check gql json content type with space
    21  - Fix minor grypto lint warning
    22  - gocsv vendor fix
    23  
    24  # Patch release: 1.6.1
    25  - Copy logger level from Logger.Level in `New()` by default
    26  
    27  # Minor release: 1.6.0
    28  - `grypto` package rewritten and will use scrypt instead of bcrypt by default, allowing you to still verify both
    29    hashes with MCF. This closes the bcrypt vulnerability of long passwords (>56 characters).
    30  - Refactoring and vendor fixes (1.5.4-rc1)
    31  
    32  # Patch release: 1.5.4
    33  - Refactoring and vendor fixes
    34  - Backported 1.6.2 patch: Check JSON content type with space
    35  
    36  # Patch release: 1.5.4-rc1
    37  - Refactoring and vendor fixes
    38  
    39  # Patch release: 1.5.3
    40  - `metrics` middleware refactored and fixed (#61)
    41  
    42  # Patch release: 1.5.2
    43  - Gramework Environments refactored. You can find the list of supported environment names below:
    44  ```
    45  environments := map[string]Environment{
    46      "prod":        PROD,
    47      "production":  PROD,
    48      "stage":       STAGE,
    49      "staging":     STAGE,
    50      "dev":         DEV,
    51      "development": DEV,
    52  }
    53  ```
    54  
    55  # Patch release: 1.5.1
    56  - Modify context.go to make it clearer
    57  - Fix typos
    58  - Unify docs/CHANGELOG.md
    59  
    60  # Minor release: 1.5.0
    61  - Separate store static route. Allows both `/post/:id` and `/post/about` routes
    62  - Health checks module added
    63  - Fix resource usage leak in ctx.Proxy()
    64  - `Sub()` now allows converting `App`'s root router to a SubRouter type
    65  
    66  # Patch release: 1.4.2
    67  - Set function for the cookie path fixed
    68  
    69  # Patch release: 1.4.1
    70  - Regression fixed: empty app name. Now if no `OptAppName` provided `App.name` will fallback to default setting
    71  
    72  # Minor release: 1.4.0
    73  - Add `OptAppName` option for App initializer
    74  - Fix ability to set empty `""` server name
    75  - Fix `fasthttp.Server` name set via `App.SetName()`
    76  - Method `App.SetName()` market as deprecated in favor of `OptAppName`
    77  - `App.ListenAndServeAllDev()` and `App.ListenAndServeAutoTLSDev()` methods marked as deprecated and from now is simple aliases of `App.ListenAndServeAll()` and `App.ListenAndServeAutoTLS()` accordingly
    78  - Fix `go.mod` dependencies and `go mod vendor` apply to support older versions of GO
    79  
    80  # Patch release: 1.3.2
    81  - Add `SubRouter.Handle()` method with the same behaviour as `Router.Handle()` and `App.Handle()`.
    82  
    83  # Patch release: 1.3.1
    84  - Fix health check formatting
    85  - Unify docs/CHANGELOG.md style
    86  
    87  # Minor release: 1.3.0
    88  - Introduce reflective handler support. Can be useful for any POSTs, including multi-typed JSON requests, etc.
    89  
    90  # Patch release: 1.2.3
    91  - Gramework serving static pre-defined JSON as a handler, see `gramework.JSON()` for more info
    92  
    93  # Patch release: 1.2.2
    94  - Introduce `app.SetCookiePath()`
    95  
    96  # Patch release: 1.2.1
    97  - Introduce `app.SetCookieExpire()` and fix cookie logic.
    98  
    99  # Minor release: 1.2.0
   100  - Add support for `PORT` environment
   101  - Add support for Gramework Environments. We have three environments: `DEV`, `STAGE` and `PROD`. You can switch them with `GRAMEWORK_ENV` or via `gramework.SetEnv()`.
   102  
   103  # Patch release: 1.1.1
   104  - Codestyle fixes
   105  - Log gramework version and system information on startup
   106  - Handler name: show the path to file starting from GOPATH
   107  - Gramework now supports serving static pre-defined HTML as a handler, see `gramework.HTML()` for more info
   108  
   109  # Minor release: 1.1.0
   110  - Minor vendor fixes
   111  - Fix router bug
   112  - Env fix
   113  - Router issue fixed
   114  - GQLHandler now can deny introspection requests
   115  - Fix internal logger
   116  - Log handler names
   117  - Support methods for handlers
   118  - Environment support
   119  - Default panic handler introduced along with new app options:
   120    - `NoDefaultPanicHandler bool` - disables default panic handler. You may also overwrite it with custom panic handler by setting it classically.
   121    - `PanicHandlerNoPoweredBy   bool` - disables "Powered by Gramework" block
   122    - `PanicHandlerCustomLayout string` - Custom layout sent after default page layout. You may use it for analytics etc.
   123  - Request tracing enabled by default. You can disable it by setting the log level to anything better than `DebugLevel`.
   124  - GraphIQL released
   125  - `ctx.MWKill()` introduced. This function kills the current context and stops any user-defined processing.
   126    This function intended for use in middlewares.
   127  - `mw/xhostname`: middleware package created and initialized with `xhostname`.
   128    This middleware provides `X-Hostname` header in each request and
   129    useful when using scalable container platform to see which host
   130    sent you current response.
   131  - `app.SetCookieDomain()`, `ctx.GetCookieDomain()` and `ContextFromValue(context.Context)` bringed in.
   132  Those features simplify working with github.com/graph-gophers/graphql-go and give you
   133  ability to run your own SSO, if you'd like to.
   134  - `gramework.New()` now supports `Opts`. See `OptUseServer` and `OptMaxRequestBodySize` in opts.go for examples
   135  - Add ToContext, DecodeGQL and ContentType functions in Context
   136  - SPAIndex now supports handlers, that can be useful with template engines of your choice
   137  - Add to Context "knowledge" about Sub's (see issue #35)
   138  - **BREAKING CHANGE**: `client` and `sqlgen` experimental packages moved to `x` subpackage!
   139  - travis config updated: we supported go 1.9.2, 1.9.x, 1.10.x and `tip` before, now we removing
   140    obsolete versions and extend our support list:
   141    - 1.9.4
   142    - 1.9.5
   143    - 1.9.6
   144    - 1.9.x
   145    - 1.10.1
   146    - 1.10.2
   147    - 1.10.3
   148  - Gramework Protection now doesn't uses any hash algo to compute remote ip hash, if ip is valid we using the ip directly.
   149    That also fixes a minor security issue
   150  - `DisableFlags()` - DisableFlags globally disables default gramework flags, which is useful
   151    when using custom flag libraries like pflag.
   152  - Protect enables Gramework Protection for routes registered after Protect() call.
   153  
   154  Protects all routes, that prefixed with given enpointPrefix.
   155  For example:
   156  ```golang
   157  app := gramework.New()
   158  app.GET("/internal/status", serveStatus) // will **not be** protected, .Protected() isn't called yet
   159  app.Protect("/internal")
   160  registerYourInternalRoutes(app.Sub("/internal")) // all routes here **are** protected
   161  ```
   162  Any blacklisted ip can't access protected enpoints via any method.
   163  The blacklist can work automatically, manually or both. To disable automatic blacklist do App.MaxHackAttemts(-1).
   164  Automatic blacklist bans suspected IP after App.MaxHackAttempts(). This behavior disabled for whitelisted IP.
   165  
   166  - Brand new Gramework Protection:
   167    - `app.Protect()`: enables Gramework Protection for routes registered after Protect() call.
   168    - `app.Whitelist()`: adds given ip to Gramework Protection trustedIP list.
   169    - `app.Untrust()`: removes given ip from trustedIP list, that enables protection
   170      of Gramework Protection enabled endpoints for given IP too. Opposite of `app.Whitelist`.
   171    - `app.Blacklist()`: adds given IP to untrustedIP list, if it's not whitelisted. Any
   172      IP blacklisted with Gramework Protection can't access protected endpoints via any method.
   173    - `app.Suspect()`: adds given IP to Gramework Protection suspectedIP list.
   174    - `app.MaxHackAttempts()`: sets new max hack attempts for blacklist triggering in
   175      The Gramework Protection. If 0 passed, MaxHackAttempts returns current value without setting a new one.
   176      If -1 passed, automatic blacklist disabled. See `ctx.Whitelist()`, `ctx.Blacklist()` and `ctx.Suspect()`
   177      for manual Gramework Protection control.
   178    - `ctx.IsWhitelisted()`: checks if we have current client in Gramework Protection
   179      trustedIP list. Use ctx.Whitelist() to add current client to trusted list.
   180    - `ctx.IsBlacklisted()`: checks if we have current client in Gramework Protection untrustedIP list.
   181      Use ctx.Blacklist() to add current client to untrustedIP list.
   182    - `ctx.IsSuspect()`: checks if we have current client in Gramework Protection suspectedIP list.
   183      Use ctx.Suspect() to add current client to suspectedIP list.
   184    - `ctx.Whitelist()`: adds given ip to trustedIP list of the Gramework Protection.
   185      To remove IP from whitelist, call App.Untrust()
   186    - `ctx.Untrust()`: deletes given ip from trustedIP list, that enables protection
   187      of Gramework Protection enabled endpoints for given ip too. Opposite of `ctx.Whitelist()`.
   188    - `ctx.Blacklist()`: adds given ip to untrustedIP list, if it's not whitelisted.
   189      Any blacklisted ip can't access protected enpoints via any method.
   190    - `ctx.Suspect()`: adds current client ip to Gramework Protection suspectedIP list.
   191    - `ctx.HackAttemptDetected()`: Suspect adds given ip to Gramework Protection
   192      suspectedIP list. Use it when you detected app-level hack attempt from current client.
   193    - `ctx.SuspectsHackAttempts()`: SuspectsHackAttempts returns hack attempts detected with
   194      Gramework Protection both automatically and manually by calling Context.HackAttemptDetected().
   195      For any whitelisted ip this function will return 0.
   196  - Test fix: use letsencrypt stage environment instead of production one
   197  - `ctx.Encode()` now supports csv marshaling
   198  - `ctx.ToCSV()` and `ctx.CSV()` added
   199  - Fix documentation for `ctx.RequestID()`
   200  - Default context logger (`ctx.Logger`) now prints request id
   201  - Panic handler now can catch more request id generation panics from google's uuid if any
   202  - Full X-Request-ID support in requests.
   203    Added support of `X-Request-ID` in request headers that have the following logic:
   204      - When `X-Request-ID` received in headers, use it as ctx.requestID
   205      - When `X-Request-ID` **was not** received in headers, generate it with Google's UUID and save it as ctx.requestID
   206  - Source code layout refactoring
   207  - Third-party licenses moved to `/third_party_licenses`
   208  - Changelog wording fixes
   209  - Improved router's stability, fixed an issue that might cause a potential denial of service.
   210    We recommend you to update
   211  - Added apex/log adapter for valyala/fasthttp.Logger
   212  - Linter's fixes
   213  - Basic Auth support via `ctx.Auth()` which returns *gramework.Auth
   214  - ctx.BadRequest() introduced
   215  - Supported `GetStringFlag(name string) (value string, ok bool)`
   216  - Support of `func(*Context) map[string]interface{}` and `func() map[string]interface{}` to JSON encoding
   217  - Support of `func(*Context) (r map[string]interface{}, err error)` and `func() (r map[string]interface{}, err error)`
   218    if r == nil && err == nil then client receive HTTP/1.1 204 No Content
   219  
   220  # Minor release candidate: 1.1.0-rc21
   221  - Minor vendor fixes
   222  - Fix router bug
   223  
   224  # Minor release candidate: 1.1.0-rc20
   225  - Env fix
   226  - Router issue fixed
   227  - GQLHandler now can deny introspection requests
   228  
   229  # Minor release candidate: 1.1.0-rc19
   230  - Fix internal logger
   231  - Log handler names
   232  - Support methods for handlers
   233  - Environment support
   234  
   235  # Minor release candidate: 1.1.0-rc18
   236  - Default panic handler introduced along with new app options:
   237    - `NoDefaultPanicHandler bool` - disables default panic handler. You may also overwrite it with custom panic handler by setting it classically.
   238    - `PanicHandlerNoPoweredBy   bool` - disables "Powered by Gramework" block
   239    - `PanicHandlerCustomLayout string` - Custom layout sent after default page layout. You may use it for analytics etc.
   240  - Requests tracing is now by default. You can disable it by setting the log level to anything better than `DebugLevel`.
   241  - GraphIQL released
   242  
   243  # Minor release candidate: 1.1.0-rc17
   244  - `ctx.MWKill()` introduced. This function kills current context and stop any user-defined processing.
   245    This function intended for use in middlewares.
   246  
   247  # Minor release candidate: 1.1.0-rc16
   248  - `mw/xhostname`: middleware package created and initialized with `xhostname`.
   249    This middleware provides `X-Hostname` header in each request and
   250    useful when using scalable container platform to see which host
   251    sent you current response.
   252  
   253  # Minor release candidate: 1.1.0-rc15
   254  - `app.SetCookieDomain()`, `ctx.GetCookieDomain()` and `ContextFromValue(context.Context)` bringed in.
   255  Those features simplify working with github.com/graph-gophers/graphql-go and give you
   256  ability to run your own SSO, if you'd like to.
   257  
   258  # Minor release candidate: 1.1.0-rc14
   259  - `gramework.New()` now supports `Opts`. See `OptUseServer` and `OptMaxRequestBodySize` in opts.go for examples
   260  
   261  # Minor release candidate: 1.1.0-rc13
   262  - Add ToContext, DecodeGQL and ContentType functions in Context
   263  - SPAIndex now supports handlers, that can be useful with template engines of your choice
   264  
   265  # Minor release candidate: 1.1.0-rc12
   266  - Add to Context "knowledge" about Sub's (see issue #35)
   267  
   268  # Major release candidate: 1.1.0-rc11: contains breaking change
   269  - **BREAKING CHANGE**: `client` and `sqlgen` experimental packages moved to `x` subpackage!
   270  - travis config updated: we supported go 1.9.2, 1.9.x, 1.10.x and `tip` before, now we removing
   271    obsolete versions and extend our support list:
   272    - 1.9.4
   273    - 1.9.5
   274    - 1.9.6
   275    - 1.9.x
   276    - 1.10.1
   277    - 1.10.2
   278    - 1.10.3
   279  
   280  # Minor release candidate: 1.1.0-rc10
   281  - Gramework Protection now doesn't use any hash algo to compute remote IP hash, if IP is valid we using the IP directly.
   282    That also fixes a minor security issue.
   283  
   284  # Minor release candidade: 1.1.0-rc9
   285  - `DisableFlags()` - DisableFlags globally disables default gramework flags, which is useful
   286    when using custom flag libraries like pflag.
   287  
   288  # Minor release candidate: 1.1.0-rc8
   289  Protect enables Gramework Protection for routes registered after Protect() call.
   290  
   291  Protects all routes, that prefixed with given enpointPrefix.
   292  For example:
   293  ```golang
   294  app := gramework.New()
   295  app.GET("/internal/status", serveStatus) // will **not be** protected, .Protected() isn't called yet
   296  app.Protect("/internal")
   297  registerYourInternalRoutes(app.Sub("/internal")) // all routes here **are** protected
   298  ```
   299  Any blacklisted ip can't access protected enpoints via any method.
   300  The blacklist can work automatically, manually or both. To disable automatic blacklist do App.MaxHackAttemts(-1).
   301  Automatic blacklist bans suspected IP after App.MaxHackAttempts(). This behavior disabled for whitelisted IP.
   302  
   303  - Brand new Gramework Protection:
   304    - `app.Protect()`: enables Gramework Protection for routes registered after Protect() call.
   305    - `app.Whitelist()`: adds given ip to Gramework Protection trustedIP list.
   306    - `app.Untrust()`: removes given ip from trustedIP list, that enables protection
   307      of Gramework Protection enabled endpoints for given IP too. Opposite of `app.Whitelist`.
   308    - `app.Blacklist()`: adds given IP to untrustedIP list, if it's not whitelisted. Any
   309      IP blacklisted with Gramework Protection can't access protected endpoints via any method.
   310    - `app.Suspect()`: adds given IP to Gramework Protection suspectedIP list.
   311    - `app.MaxHackAttempts()`: sets new max hack attempts for blacklist triggering in
   312      The Gramework Protection. If 0 passed, MaxHackAttempts returns current value without setting a new one.
   313      If -1 passed, automatic blacklist disabled. See `ctx.Whitelist()`, `ctx.Blacklist()` and `ctx.Suspect()`
   314      for manual Gramework Protection control.
   315    - `ctx.IsWhitelisted()`: checks if we have current client in Gramework Protection
   316      trustedIP list. Use ctx.Whitelist() to add current client to trusted list.
   317    - `ctx.IsBlacklisted()`: checks if we have current client in Gramework Protection untrustedIP list.
   318      Use ctx.Blacklist() to add current client to untrustedIP list.
   319    - `ctx.IsSuspect()`: checks if we have current client in Gramework Protection suspectedIP list.
   320      Use ctx.Suspect() to add current client to suspectedIP list.
   321    - `ctx.Whitelist()`: adds given ip to trustedIP list of the Gramework Protection.
   322      To remove IP from whitelist, call App.Untrust()
   323    - `ctx.Untrust()`: deletes given ip from trustedIP list, that enables protection
   324      of Gramework Protection enabled endpoints for given ip too. Opposite of `ctx.Whitelist()`.
   325    - `ctx.Blacklist()`: adds given ip to untrustedIP list, if it's not whitelisted.
   326      Any blacklisted ip can't access protected enpoints via any method.
   327    - `ctx.Suspect()`: adds current client ip to Gramework Protection suspectedIP list.
   328    - `ctx.HackAttemptDetected()`: Suspect adds given ip to Gramework Protection
   329      suspectedIP list. Use it when you detected app-level hack attempt from current client.
   330    - `ctx.SuspectsHackAttempts()`: SuspectsHackAttempts returns hack attempts detected with
   331      Gramework Protection both automatically and manually by calling Context.HackAttemptDetected().
   332      For any whitelisted IP, this function returns 0.
   333  - Test fix: use letsencrypt stage environment instead of production one
   334  
   335  # Minor release candidade: 1.0.0-rc7
   336  - `ctx.Encode()` now supports csv marshaling
   337  - `ctx.ToCSV()` and `ctx.CSV()` added
   338  - Fix documentation for `ctx.RequestID()`
   339  
   340  # Minor release candidate: 1.0.0-rc6
   341  - Default context logger (`ctx.Logger`) now prints request id
   342  - Panic handler now can catch more request id generation panics from google's UUID if any
   343  
   344  # Minor release candidate: 1.0.0-rc5
   345  - Full X-Request-ID support in requests.
   346    Added support of `X-Request-ID` in request headers that have the following logic:
   347      - When `X-Request-ID` received in headers, use it as ctx.requestID
   348      - When `X-Request-ID` **was not** received in headers, generate it with Google's UUID and save it as ctx.requestID
   349  - Source code layout refactoring
   350  - Third-party licenses moved to `/third_party_licenses`
   351  - Changelog wording fixes
   352  
   353  # Minor release candidate: 1.1.0-rc4
   354  - Improved router's stability, fixed an issue that might cause a potential denial of service.
   355    We recommend you to update
   356  - Added apex/log adapter for valyala/fasthttp.Logger
   357  - Linter's fixes
   358  
   359  # Minor release candidade: 1.1.0-rc3
   360  - Basic Auth support via `ctx.Auth()` which returns *gramework.Auth
   361  - ctx.BadRequest() introduced
   362  
   363  # Minor release candidade: 1.1.0-rc2
   364  - Supported `GetStringFlag(name string) (value string, ok bool)`
   365  
   366  # Minor release candidade: 1.1.0-rc1
   367  - Support of `func(*Context) map[string]interface{}` and `func() map[string]interface{}` to JSON encoding
   368  - Support of `func(*Context) (r map[string]interface{}, err error)` and `func() (r map[string]interface{}, err error)`
   369    if r == nil && err == nil then client receive HTTP/1.1 204 No Content
   370  
   371  # Major: 1.0.0
   372  - Initial release