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

static: support setting "Cache-Control" #143

Merged
merged 4 commits into from Oct 19, 2022
Merged

static: support setting "Cache-Control" #143

merged 4 commits into from Oct 19, 2022

Conversation

pharrisee
Copy link
Contributor

Describe the pull request

This PR adds a Cache-Control option for static files that works in the same fashion as the existing Expires option.

Link to the issue: n/a

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

@unknwon
Copy link
Member

unknwon commented Oct 19, 2022

Re-open PR to trigger CI builds

@unknwon unknwon closed this Oct 19, 2022
@unknwon unknwon reopened this Oct 19, 2022
@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Merging #143 (686d55f) into main (2c4d8c8) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
+ Coverage   89.40%   89.41%   +0.01%     
==========================================
  Files          17       17              
  Lines        1170     1172       +2     
==========================================
+ Hits         1046     1048       +2     
  Misses         81       81              
  Partials       43       43              

Copy link
Member

@unknwon unknwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

static.go Outdated Show resolved Hide resolved
static_test.go Outdated Show resolved Hide resolved
@unknwon unknwon changed the title With cache control for static static: support setting "Cache-Control" Oct 19, 2022
@unknwon unknwon merged commit 9e2c44f into flamego:main Oct 19, 2022
@unknwon
Copy link
Member

unknwon commented Oct 19, 2022

https://github.com/flamego/flamego/releases/tag/v1.6.0 has been published for this merge.

@pharrisee pharrisee deleted the With-Cache-Control-for-static branch October 19, 2022 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants