This commit is contained in:
Gerasimos (Makis) Maropoulos 2020-08-21 20:48:41 +03:00
parent 95c3c2a951
commit 27686d7c1c
No known key found for this signature in database
GPG Key ID: 5DBE766BD26A54E7
3 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@ func newApp() *iris.Application {
/* /*
Or if you need to cache them inside the memory (requires the assets folder Or if you need to cache them inside the memory (requires the assets folder
to be located near the executable program): 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", IndexName: "index.html",
Cache: iris.DirCacheOptions{ Cache: iris.DirCacheOptions{
Enable: true, Enable: true,

View File

@ -11,7 +11,7 @@ RedirectMatch: # REDIRECT_CODE_DIGITS | PATTERN_REGEX | TARGET_REPL
# Redirects http or https://test.* to http or https://newtest.* # Redirects http or https://test.* to http or https://newtest.*
- 301 ^(http|https)://test.(.*) $1://newtest.$2 - 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. # without redirect. See /users route.
# When Code is 0 then it does not redirect the request, # When Code is 0 then it does not redirect the request,
# instead it changes the request URL # instead it changes the request URL

View File

@ -671,6 +671,7 @@ func (api *APIBuilder) Party(relativePath string, handlers ...context.Handler) P
childAPI := &APIBuilder{ childAPI := &APIBuilder{
// global/api builder // global/api builder
logger: api.logger,
macros: api.macros, macros: api.macros,
routes: api.routes, routes: api.routes,
beginGlobalHandlers: api.beginGlobalHandlers, beginGlobalHandlers: api.beginGlobalHandlers,