Set nocache for templates
This commit is contained in:
parent
cbc3a017e8
commit
d6ab257473
@ -5,7 +5,9 @@ import org.http4k.core.Response
|
||||
import org.http4k.core.Status.Companion.FOUND
|
||||
import org.http4k.core.Status.Companion.MOVED_PERMANENTLY
|
||||
|
||||
fun Response.html(html: String) = body(html).header("Content-Type", "text/html; charset=utf-8")
|
||||
fun Response.html(html: String) = body(html)
|
||||
.header("Content-Type", "text/html; charset=utf-8")
|
||||
.header("Cache-Control", "no-cache")
|
||||
|
||||
fun Response.Companion.redirect(url: String, permanent: Boolean = false) =
|
||||
Response(if (permanent) MOVED_PERMANENTLY else FOUND).header("Location", url)
|
||||
|
||||
@ -36,7 +36,7 @@ class BaseView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
||||
<form class="md:space-x-2" id="search">
|
||||
<input aria-label="demo-search" name="search" disabled="" value="tag:"demo"">
|
||||
<span id="buttons">
|
||||
<button disabled="" class="btn btn-green pointer-events-none">search</button>
|
||||
<button type="button" disabled="" class="btn btn-green pointer-events-none">search</button>
|
||||
<span class="btn btn-red pointer-events-none">clear</span>
|
||||
</span>
|
||||
</form>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user