1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-05-11 02:01:38 +00:00

20 Commits

Author SHA1 Message Date
Michael Bell
8228da91fc
[filesystem middleware] improve status for SendFile ()
SendFile response code for success
2023-10-06 13:10:20 +02:00
René Werner
59409f3841 improve sendFile documentation 2023-10-06 11:43:10 +02:00
CuiPeiyu
d0d5e9ee99
[middleware/filesystem]: Set response code ()
Specified response code
2023-09-14 14:46:34 +02:00
M. Efe Çetin
9fbb961adb
filesystem: refactor: use errors.Is instead of os.IsNotExist () 2023-08-06 18:10:44 +02:00
bcd
3c3f12b76c
[Feature]: Add filesystem config contentTypeCharset support ()
* Update filesystem.go

* Update filesystem_test.go

* Update filesystem.md

* fmt
2023-05-02 08:40:20 +02:00
leonklingele
ac4ce21d9c
🐛 Bug: Fix issues introduced in linting PR ()
* internal: revert linting changes

Changes to the internal package should not have been made in 167a8b5e9421e0ab51fbf44c5621632f4a1a90c5.

* middleware/monitor: revert changes to exported field "ChartJSURL"

This is a breaking change introduced in 167a8b5e9421e0ab51fbf44c5621632f4a1a90c5.

* middleware/monitor: fix error checking

Fix the errorenous error checking introduced in 167a8b5e9421e0ab51fbf44c5621632f4a1a90c5.

* 🐛 Bug: Fix issues introduced in linting PR 

* 🐛 Bug: Fix issues introduced in linting PR 

* Bug: Fix issues introduced in linting PR 

---------

Co-authored-by: René Werner <rene@gofiber.io>
2023-02-02 15:57:40 +01:00
leonklingele
167a8b5e94
🚀 Feature: Add and apply more stricter golangci-lint linting rules ()
* golangci-lint: add and apply more stricter linting rules

* github: drop security workflow now that we use gosec linter inside golangci-lint

* github: use official golangci-lint CI linter

* Add editorconfig and gitattributes file
2023-01-27 09:01:37 +01:00
Xaver Fischer
6d798dbda9
📝 middleware/filesystem does not handle url encoded values on it's own ()
* 📝 middleware/filesystem does not handle url encoded values

* Update README.md

add newline after first warning

Co-authored-by: Xaver Fischer <xaverfischer@mail.de>
2022-12-01 08:53:40 +01:00
Gusted
7b7dcf29f7
♻️ Tidy up the codebase ()
* run gofmt

* add t.Helper()

* Simplify assigns

* Simplify make operation

* Remove unused field in struct

* Fix typo

* Run gofumpt ./

* Consistent spacing

* len(...) can never be negative

* Use ReplaceAll

* Simplify operation

* Remove deadcode

* Fix typo

* Tidy up `} else { if ...`

* Fix AssertEqual

* Remove t.Helper() to fix go1.14.15
2021-11-05 08:00:03 +01:00
Fufu
8b3a06b164
Fix: file opening path and directory browsing path of filesystem ()
* Fix: file opening path and directory browsing path of filesystem

* Update: utils.TrimRight instead of strings.TrimSuffix
2021-09-29 19:53:25 +02:00
Tom
21c9fb4936
🔥 Add PathPrefix parameter to filesystem middleware ()
See 

This adds a parameter called `PathPrefix` to `filesystem.Config`
that is prepended to any filepath being read from
`filesystem.Root`.

Intended to be used with Go 1.16's `embed.FS` type.

Signed-off-by: Tom <tom@tdpain.net>
2021-05-12 08:58:01 +02:00
Fenny
c78a5013c0 update sendfile
Co-Authored-By: Renan Bastos <renanbastos.tec@gmail.com>
2020-10-28 05:37:07 +01:00
renanbastos93
1b4c0432c0 🔪 change signature method 2020-10-28 01:25:08 -03:00
renanbastos93
e41bf7f08f 🚀 start poc 2020-10-28 01:11:49 -03:00
Fenny
d5dbad6476 🧹 remove unused key 2020-10-27 08:14:58 +01:00
Fenny
726600f577 🧳 add maxAge to filesystem mw 2020-10-27 08:12:37 +01:00
kiyon
30783dd25d 👷 add filesystem test cases 2020-09-17 12:56:11 +08:00
kiyon
e13411e184 👷 improve mw test cases
add Next test case
2020-09-16 09:44:05 +08:00
Stephan Deumier
58d657cb0a
Update filesystem.go 2020-09-14 16:12:46 +02:00
Fenny
ec5d66e7a8 v2 2020-09-13 11:20:11 +02:00