* internal: revert linting changes
Changes to the internal package should not have been made in 167a8b5e94.
* middleware/monitor: revert changes to exported field "ChartJSURL"
This is a breaking change introduced in 167a8b5e94.
* middleware/monitor: fix error checking
Fix the errorenous error checking introduced in 167a8b5e94.
* 🐛 Bug: Fix issues introduced in linting PR #2319
* 🐛 Bug: Fix issues introduced in linting PR #2319
* Bug: Fix issues introduced in linting PR #2319
---------
Co-authored-by: René Werner <rene@gofiber.io>
* 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
* ✨ Cache middleware: Store e2e headers.
As defined in RFC2616 - section-13.5.1, shared caches MUST
store end-to-end headers from backend response and MUST be
transmitted in any response formed from a cache entry.
This commit ensures a stronger consistency between responses
served from the handlers & from the cache middleware.
* ✨ Cache middleware: Add flag for e2e headers.
Set flag to prevent e2e headers caching to
be the default behavior of the cache middleware.
This would otherwise change quite a lot the
experience for cache middleware current users.
* ✨ Cache middleware: Add Benchmark for additionalHeaders feature.
* ✨ Cache middleware: Rename E2Eheaders into StoreResponseHeaders.
E2E is an acronym commonly associated with test.
While in the present case it refers to end-to-end
HTTP headers (by opposition to hop-by-hop), this
still remains confusing. This commits renames it
to a more generic name.
* ✨ Cache middleware: Update README
* ✨ Cache middleware: Move map instanciation.
This will prevent an extra memory allocation for users
not interested in this feature.
* ✨ Cache middleware: Prevent memory allocation when StoreResponseHeaders is disabled.
* ✨ Cache middleware: Store e2e headers. #1807
- use set instead of add for the headers
- copy value from the headers -> prevent problems with mutable values
Co-authored-by: wernerr <rene@gofiber.io>
* add cache header to show cache status
* update default CacheHeader to X-Cache
* add CacheHeader test
* Update cache_test.go
use constants in test
Co-authored-by: RW <rene@gofiber.io>