Skip to content

Commit

Permalink
release: 0.0.7 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb authored Apr 11, 2024
2 parents 32a0235 + be88332 commit dec12ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</h4>
<br>
<a href="https://github.com/devxb/gitanimals">
<img src="docs/sample.svg"/>
<img alt="docs/sample.svg" src="https://render.gitanimals.org/farms/devxb"/>
</a>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@

### ๋“ฑ์žฅ ๊ฐ€๋Šฅํ•œ ํŽซ๋“ค

<img alt="docs/pets.svg" src="https://render.gitanimals.org/farms/devxb"/>
<img alt="docs/pets.svg" src="docs/pets.svg"/>

##

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package org.gitanimals.render.controller

import jakarta.servlet.http.HttpServletResponse
import org.gitanimals.render.app.AnimationFacade
import org.springframework.http.HttpHeaders
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
Expand All @@ -16,8 +14,16 @@ class AnimationController(
) {

@GetMapping(value = ["/{username}"], produces = ["image/svg+xml"])
fun getSvgAnimation(@PathVariable("username") username: String, response: HttpServletResponse): String {
response.setHeader(HttpHeaders.CACHE_CONTROL, "max-age=1")
fun getSvgAnimation(
@PathVariable("username") username: String,
response: HttpServletResponse
): String {
response.noCache()
return animationFacade.getSvgAnimationByUsername(username)
}

fun HttpServletResponse.noCache(): HttpServletResponse {
this.setHeader("Cache-Control", "no-cache, no-store, must-revalidate")
return this
}
}

0 comments on commit dec12ee

Please sign in to comment.