api: Add Cache-Control header.
This commit is contained in:
parent
793dbcc611
commit
7e5827a7a2
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user