mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2024-12-06 19:16:43 +01:00
feat: version and back button
This commit is contained in:
+4
-1
@@ -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 {
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user