mirror of
https://github.com/kataras/iris.git
synced 2025-03-15 05:16:28 +01:00
Fix HISTORY.md v4.5.0 entry's format
This commit is contained in:
parent
f66b7e2eab
commit
110f28fda5
86
HISTORY.md
86
HISTORY.md
|
@ -9,48 +9,50 @@
|
||||||
- `CheckOrigin func(ctx *Context)`. Manually allow or dissalow client's websocket access, ex: via header **Origin**. Default allow all origins(CORS-like) as before.
|
- `CheckOrigin func(ctx *Context)`. Manually allow or dissalow client's websocket access, ex: via header **Origin**. Default allow all origins(CORS-like) as before.
|
||||||
- `Headers bool`. Allow websocket handler to copy request's headers on the handshake. Default is true
|
- `Headers bool`. Allow websocket handler to copy request's headers on the handshake. Default is true
|
||||||
With these in-mind the `WebsocketConfiguration` seems like this now :
|
With these in-mind the `WebsocketConfiguration` seems like this now :
|
||||||
```go
|
|
||||||
type WebsocketConfiguration struct {
|
```go
|
||||||
// WriteTimeout time allowed to write a message to the connection.
|
type WebsocketConfiguration struct {
|
||||||
// Default value is 15 * time.Second
|
// WriteTimeout time allowed to write a message to the connection.
|
||||||
WriteTimeout time.Duration
|
// Default value is 15 * time.Second
|
||||||
// PongTimeout allowed to read the next pong message from the connection
|
WriteTimeout time.Duration
|
||||||
// Default value is 60 * time.Second
|
// PongTimeout allowed to read the next pong message from the connection
|
||||||
PongTimeout time.Duration
|
// Default value is 60 * time.Second
|
||||||
// PingPeriod send ping messages to the connection with this period. Must be less than PongTimeout
|
PongTimeout time.Duration
|
||||||
// Default value is (PongTimeout * 9) / 10
|
// PingPeriod send ping messages to the connection with this period. Must be less than PongTimeout
|
||||||
PingPeriod time.Duration
|
// Default value is (PongTimeout * 9) / 10
|
||||||
// MaxMessageSize max message size allowed from connection
|
PingPeriod time.Duration
|
||||||
// Default value is 1024
|
// MaxMessageSize max message size allowed from connection
|
||||||
MaxMessageSize int64
|
// Default value is 1024
|
||||||
// BinaryMessages set it to true in order to denotes binary data messages instead of utf-8 text
|
MaxMessageSize int64
|
||||||
// see https://github.com/kataras/iris/issues/387#issuecomment-243006022 for more
|
// BinaryMessages set it to true in order to denotes binary data messages instead of utf-8 text
|
||||||
// defaults to false
|
// see https://github.com/kataras/iris/issues/387#issuecomment-243006022 for more
|
||||||
BinaryMessages bool
|
// defaults to false
|
||||||
// Endpoint is the path which the websocket server will listen for clients/connections
|
BinaryMessages bool
|
||||||
// Default value is empty string, if you don't set it the Websocket server is disabled.
|
// Endpoint is the path which the websocket server will listen for clients/connections
|
||||||
Endpoint string
|
// Default value is empty string, if you don't set it the Websocket server is disabled.
|
||||||
// ReadBufferSize is the buffer size for the underline reader
|
Endpoint string
|
||||||
ReadBufferSize int
|
// ReadBufferSize is the buffer size for the underline reader
|
||||||
// WriteBufferSize is the buffer size for the underline writer
|
ReadBufferSize int
|
||||||
WriteBufferSize int
|
// WriteBufferSize is the buffer size for the underline writer
|
||||||
// Headers if true then the client's headers are copy to the websocket connection
|
WriteBufferSize int
|
||||||
//
|
// Headers if true then the client's headers are copy to the websocket connection
|
||||||
// Default is true
|
//
|
||||||
Headers bool
|
// Default is true
|
||||||
// Error specifies the function for generating HTTP error responses.
|
Headers bool
|
||||||
//
|
// Error specifies the function for generating HTTP error responses.
|
||||||
// The default behavior is to store the reason in the context (ctx.Set(reason)) and fire any custom error (ctx.EmitError(status))
|
//
|
||||||
Error func(ctx *Context, status int, reason string)
|
// The default behavior is to store the reason in the context (ctx.Set(reason)) and fire any custom error (ctx.EmitError(status))
|
||||||
// CheckOrigin returns true if the request Origin header is acceptable. If
|
Error func(ctx *Context, status int, reason string)
|
||||||
// CheckOrigin is nil, the host in the Origin header must not be set or
|
// CheckOrigin returns true if the request Origin header is acceptable. If
|
||||||
// must match the host of the request.
|
// CheckOrigin is nil, the host in the Origin header must not be set or
|
||||||
//
|
// must match the host of the request.
|
||||||
// The default behavior is to allow all origins
|
//
|
||||||
// you can change this behavior by setting the iris.Config.Websocket.CheckOrigin = iris.WebsocketCheckSameOrigin
|
// The default behavior is to allow all origins
|
||||||
CheckOrigin func(ctx *Context) bool
|
// you can change this behavior by setting the iris.Config.Websocket.CheckOrigin = iris.WebsocketCheckSameOrigin
|
||||||
}
|
CheckOrigin func(ctx *Context) bool
|
||||||
```
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
- **REMOVE**: `github.com/kataras/iris/context/context.go` , this is no needed anymore. Its only usage was inside `sessions` and `websockets`, a month ago I did improvements to the sessions as a standalone package, the IContext interface is not being used there. With the today's changes, the iris-contrib/websocket doesn't needs the IContext interface too, so the whole folder `./context` is useless and removed now. Users developers don't have any side-affects from this change.
|
- **REMOVE**: `github.com/kataras/iris/context/context.go` , this is no needed anymore. Its only usage was inside `sessions` and `websockets`, a month ago I did improvements to the sessions as a standalone package, the IContext interface is not being used there. With the today's changes, the iris-contrib/websocket doesn't needs the IContext interface too, so the whole folder `./context` is useless and removed now. Users developers don't have any side-affects from this change.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user