ServeFileUncompressed returns HTTP response containing file contents from the given path. Directory contents is returned if path points to directory. ServeFile may be used for saving network traffic when serving files with good compression ratio. See also RequestCtx.SendFile. WARNING: do not pas
(ctx *RequestCtx, path string)
| 56 | // WARNING: if path is based on user input users will be able to request |
| 57 | // any file on your filesystem! Use fasthttp.FS with a sane Root instead. |
| 58 | func ServeFileUncompressed(ctx *RequestCtx, path string) { |
| 59 | ctx.Request.Header.DelBytes(strAcceptEncoding) |
| 60 | ServeFile(ctx, path) |
| 61 | } |
| 62 | |
| 63 | // ServeFileBytes returns HTTP response containing compressed file contents |
| 64 | // from the given path. |
searching dependent graphs…