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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CacheControl to Static config #2140

Merged

Conversation

nathanfaucett
Copy link
Contributor

@nathanfaucett nathanfaucett commented Oct 5, 2022

Description

adds SetHeaders function option to Static config like express.js setHeaders function https://expressjs.com/en/resources/middleware/serve-static.html#setheaders

Fixes #2136

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • For new functionalities I follow the inspiration of the express js framework and built them similar in usage
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I tried to make my code as fast as possible with as few allocations as possible
  • I have made corresponding changes to the documentation - https://github.com/gofiber/docs for https://docs.gofiber.io/

Commit formatting:

Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

@nathanfaucett nathanfaucett force-pushed the feature/allow-custom-cache-function branch from 5a67c2a to 5fce226 Compare October 5, 2022 13:45
@welcome
Copy link

welcome bot commented Oct 5, 2022

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

app.go Outdated Show resolved Hide resolved
@ReneWerner87
Copy link
Member

ReneWerner87 commented Oct 5, 2022

don´t forget this task

@nathanfaucett
Copy link
Contributor Author

nathanfaucett commented Oct 5, 2022

don´t forget this task

@ReneWerner87 gofiber/docs#287

@ReneWerner87 ReneWerner87 merged commit 6a5fc64 into gofiber:master Oct 5, 2022
@nathanfaucett nathanfaucett deleted the feature/allow-custom-cache-function branch October 5, 2022 16:15
@welcome
Copy link

welcome bot commented Oct 5, 2022

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

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

Successfully merging this pull request may close these issues.

🚀 [Feature]: Add config option to Static config to disabled cache on Index routes
3 participants