diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2025-01-05 17:17:52 -0800 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2025-01-05 17:17:52 -0800 |
commit | cb61b8e34942e661a394069302cd39827c92ae33 (patch) | |
tree | b409465796e3d19b2bcbfb686717041ae7661035 /api/template | |
parent | 604d4981f29470cd3c28692a79831f405db1eef2 (diff) | |
download | whois-cb61b8e34942e661a394069302cd39827c92ae33.tar.gz whois-cb61b8e34942e661a394069302cd39827c92ae33.zip |
add json route
Diffstat (limited to 'api/template')
-rw-r--r-- | api/template/template.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/api/template/template.go b/api/template/template.go index 9b43a42..4e0d4f9 100644 --- a/api/template/template.go +++ b/api/template/template.go @@ -65,7 +65,9 @@ func TemplateContinuation(path string, showBase bool) types.Continuation { return failure(context, req, resp) } - resp.Header().Set("Content-Type", "text/html") + if showBase { + resp.Header().Set("Content-Type", "text/html") + } resp.Write(html.Bytes()) return success(context, req, resp) } |