feat: version and back button

This commit is contained in:
httpjamesm
2022-12-28 11:33:26 -05:00
parent 3398ba637b
commit 504144c94b
6 changed files with 43 additions and 8 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
package routes
import (
"anonymousoverflow/config"
"fmt"
"strings"
@@ -8,7 +9,9 @@ import (
)
func GetHome(c *gin.Context) {
c.HTML(200, "home.html", gin.H{})
c.HTML(200, "home.html", gin.H{
"version": config.Version,
})
}
type urlConversionRequest struct {
+2 -2
View File
@@ -141,10 +141,10 @@ func ViewQuestion(c *gin.Context) {
answers = append(answers, template.HTML(answerBodyHTML))
})
imagePolicy := "https:"
imagePolicy := "'self' https:"
if c.MustGet("disable_images").(bool) {
imagePolicy = "'none'"
imagePolicy = "'self'"
}
c.HTML(200, "question.html", gin.H{