mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-05-16 15:03:01 +00:00
fix: add no cache to static
This commit is contained in:
parent
eee8ec42c5
commit
4d8632e26c
2 changed files with 16 additions and 1 deletions
3
main.go
3
main.go
|
@ -32,7 +32,6 @@ func main() {
|
|||
r := gin.Default()
|
||||
|
||||
r.LoadHTMLGlob("templates/*")
|
||||
r.Static("/static", "./public")
|
||||
|
||||
r.Use(gin.Recovery())
|
||||
r.Use(middleware.XssPreventionHeaders())
|
||||
|
@ -40,6 +39,8 @@ func main() {
|
|||
r.Use(middleware.OptionsMiddleware())
|
||||
r.Use(middleware.Ratelimit())
|
||||
|
||||
r.GET("/static/*filepath", routes.StaticContent)
|
||||
|
||||
r.GET("/robots.txt", func(c *gin.Context) {
|
||||
c.String(200, "User-agent: *\nDisallow: /")
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue