mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
Release of version 10.4.0 - x8 faster embedded file server | Star and Read HISTORY.md
Former-commit-id: 4f8b8c95c1b107a9be3b1ef6835ece949a75ceb6
This commit is contained in:
12
iris.go
12
iris.go
@@ -346,6 +346,18 @@ var (
|
||||
//
|
||||
// Examples: https://github.com/kataras/iris/tree/master/_examples/file-server
|
||||
StaticEmbeddedHandler = router.StaticEmbeddedHandler
|
||||
// StripPrefix returns a handler that serves HTTP requests
|
||||
// by removing the given prefix from the request URL's Path
|
||||
// and invoking the handler h. StripPrefix handles a
|
||||
// request for a path that doesn't begin with prefix by
|
||||
// replying with an HTTP 404 not found error.
|
||||
//
|
||||
// Usage:
|
||||
// fileserver := Party#StaticHandler("./static_files", false, false)
|
||||
// h := iris.StripPrefix("/static", fileserver)
|
||||
// app.Get("/static/{f:path}", h)
|
||||
// app.Head("/static/{f:path}", h)
|
||||
StripPrefix = router.StripPrefix
|
||||
// Gzip is a middleware which enables writing
|
||||
// using gzip compression, if client supports.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user