api: Add Cache-Control header.

This commit is contained in:
Jonathan Bernard 2019-05-19 18:28:38 -05:00
parent 793dbcc611
commit 7e5827a7a2

View File

@ -35,7 +35,10 @@ template halt(code: HttpCode,
template jsonResp(code: HttpCode, details: string = "", headers: RawHeaders = @{:} ) = template jsonResp(code: HttpCode, details: string = "", headers: RawHeaders = @{:} ) =
halt( halt(
code, code,
headers & @{"Content-Type": JSON}, headers & @{
"Content-Type": JSON,
"Cache-Control": "no-cache"
},
$(%* { $(%* {
"statusCode": code.int, "statusCode": code.int,
"status": $code, "status": $code,