Added UrlRandomToken in template data
This commit is contained in:
@ -179,6 +179,7 @@ func (s *Server) previewHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
Filename string
|
Filename string
|
||||||
Url string
|
Url string
|
||||||
UrlGet string
|
UrlGet string
|
||||||
|
UrlRandomToken string
|
||||||
Hostname string
|
Hostname string
|
||||||
WebAddress string
|
WebAddress string
|
||||||
ContentLength uint64
|
ContentLength uint64
|
||||||
@ -191,6 +192,7 @@ func (s *Server) previewHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
filename,
|
filename,
|
||||||
resolvedURL,
|
resolvedURL,
|
||||||
resolvedURLGet,
|
resolvedURLGet,
|
||||||
|
token,
|
||||||
hostname,
|
hostname,
|
||||||
webAddress,
|
webAddress,
|
||||||
contentLength,
|
contentLength,
|
||||||
@ -1007,7 +1009,6 @@ func (s *Server) getHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
w.Header().Set("X-Remaining-Downloads", remainingDownloads)
|
w.Header().Set("X-Remaining-Downloads", remainingDownloads)
|
||||||
w.Header().Set("X-Remaining-Days", remainingDays)
|
w.Header().Set("X-Remaining-Days", remainingDays)
|
||||||
|
|
||||||
|
|
||||||
if disposition == "inline" && strings.Contains(contentType, "html") {
|
if disposition == "inline" && strings.Contains(contentType, "html") {
|
||||||
reader = ioutil.NopCloser(bluemonday.UGCPolicy().SanitizeReader(reader))
|
reader = ioutil.NopCloser(bluemonday.UGCPolicy().SanitizeReader(reader))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user