diff --git a/_examples/file-server/embedding-files-into-app/main.go b/_examples/file-server/embedding-files-into-app/main.go index ccb39b25..344f2fe6 100644 --- a/_examples/file-server/embedding-files-into-app/main.go +++ b/_examples/file-server/embedding-files-into-app/main.go @@ -20,7 +20,7 @@ func newApp() *iris.Application { /* Or if you need to cache them inside the memory (requires the assets folder to be located near the executable program): - app.HandleDir("/static", http.Dir("./assets"), iris.DirOptions{ + app.HandleDir("/static", iris.Dir("./assets"), iris.DirOptions{ IndexName: "index.html", Cache: iris.DirCacheOptions{ Enable: true, diff --git a/_examples/routing/rewrite/redirects.yml b/_examples/routing/rewrite/redirects.yml index 99a74171..63b68290 100644 --- a/_examples/routing/rewrite/redirects.yml +++ b/_examples/routing/rewrite/redirects.yml @@ -11,7 +11,7 @@ RedirectMatch: # REDIRECT_CODE_DIGITS | PATTERN_REGEX | TARGET_REPL # Redirects http or https://test.* to http or https://newtest.* - 301 ^(http|https)://test.(.*) $1://newtest.$2 - # Handle /*.json or .xml as *?format=json or xml, + # Handles /*.json or .xml as *?format=json or xml, # without redirect. See /users route. # When Code is 0 then it does not redirect the request, # instead it changes the request URL diff --git a/core/router/api_builder.go b/core/router/api_builder.go index ef2678a8..3a787dc4 100644 --- a/core/router/api_builder.go +++ b/core/router/api_builder.go @@ -671,6 +671,7 @@ func (api *APIBuilder) Party(relativePath string, handlers ...context.Handler) P childAPI := &APIBuilder{ // global/api builder + logger: api.logger, macros: api.macros, routes: api.routes, beginGlobalHandlers: api.beginGlobalHandlers,