Merge pull request #370 from dutchcoders/ISSUE-38-WEB

Added UrlRandomToken in template data
This commit is contained in:
Stefan Benten 2021-05-09 10:37:43 +02:00 committed by GitHub
commit b5ffdb5095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,6 +179,7 @@ func (s *Server) previewHandler(w http.ResponseWriter, r *http.Request) {
Filename string
Url string
UrlGet string
UrlRandomToken string
Hostname string
WebAddress string
ContentLength uint64
@ -191,6 +192,7 @@ func (s *Server) previewHandler(w http.ResponseWriter, r *http.Request) {
filename,
resolvedURL,
resolvedURLGet,
token,
hostname,
webAddress,
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-Days", remainingDays)
if disposition == "inline" && strings.Contains(contentType, "html") {
reader = ioutil.NopCloser(bluemonday.UGCPolicy().SanitizeReader(reader))
}