Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 [Question]: Question on ETag Docs #2987

Open
3 tasks done
kirankumar-grootan opened this issue Apr 25, 2024 · 1 comment
Open
3 tasks done

馃 [Question]: Question on ETag Docs #2987

kirankumar-grootan opened this issue Apr 25, 2024 · 1 comment

Comments

@kirankumar-grootan
Copy link

Question Description

As per doc you can utilize Etag as middleware, and there's also an option to enable it in fiber.config.

https://docs.gofiber.io/api/middleware/etag/
https://docs.gofiber.io/api/fiber

Are the functionalities the same when enabling via fiber.config or middleware? What's the distinction between the two methods?

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my questions prior to opening this one.
  • I understand that improperly formatted questions may be closed without explanation.
@ReneWerner87
Copy link
Member

@kirankumar-grootan
the setting in the app was there before we had the middleware and afterwards we couldn't remove it because it would have caused a breaking change.

in v3 this setting has been removed and you are supposed to use the middleware.

the difference is that the app setting affects all routes and with the middleware you could only apply the etag procedure to certain routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants