console/docs: tell documentation is public

Initially, the goal was to also add client caching for POST requests.
However, no browser respect the cache for POST.
This commit is contained in:
Vincent Bernat
2022-12-19 14:27:37 +01:00
parent 4201ccc352
commit 77fe2c7b77

View File

@@ -126,7 +126,7 @@ func (c *Component) docsHandlerFunc(gc *gin.Context) {
gc.JSON(http.StatusInternalServerError, gin.H{"message": "Unable to render document."})
return
}
gc.Header("Cache-Control", "max-age=300")
gc.Header("Cache-Control", "max-age=300, public")
gc.PureJSON(http.StatusOK, gin.H{
"markdown": buf.String(),
"toc": toc,