Skip to content

Commit

Permalink
Merge branch 'main' into release-0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chhsiao1981 authored Jan 1, 2021
2 parents 9bad883 + 5a45101 commit 77b8c9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/api_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -117,7 +118,7 @@ func processCSRFContent(filename string, c *gin.Context) {
csrfToken, err := createCSRFToken()
content = strings.Replace(content, "__CSRFTOKEN__", csrfToken, 1)

c.Header("Cache-Control", "max-age=")
c.Header("Cache-Control", "max-age="+strconv.Itoa(types.CSRF_TOKEN_TS))

processStringResult(c, content, mimeType)
}

0 comments on commit 77b8c9c

Please sign in to comment.