File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1313 Skipper Skipper
1414
1515 // Validator is a function to validate BasicAuth credentials.
16+ // Required.
1617 Validator BasicAuthValidator
1718 }
1819
@@ -46,6 +47,9 @@ func BasicAuth(fn BasicAuthValidator) echo.MiddlewareFunc {
4647// See `BasicAuth()`.
4748func BasicAuthWithConfig (config BasicAuthConfig ) echo.MiddlewareFunc {
4849 // Defaults
50+ if config .Validator == nil {
51+ panic ("basic-auth middleware requires validator function" )
52+ }
4953 if config .Skipper == nil {
5054 config .Skipper = DefaultBasicAuthConfig .Skipper
5155 }
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ func WWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
135135 }
136136}
137137
138- // NonWWWRedirect redirects WWW request to non WWW.
138+ // NonWWWRedirect redirects WWW requests to non WWW.
139139// For example, http://www.labstack.com will be redirect to http://labstack.com.
140140//
141141// Usage `Echo#Pre(NonWWWRedirect())`
You can’t perform that action at this time.
0 commit comments