Selaa lähdekoodia

chore: watch "custom" directory in dev and use lowercase for header value (#6927)

Joe Chen 3 vuotta sitten
vanhempi
sitoutus
f45dbf3e76
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1 0
      Taskfile.yml
  2. 1 1
      internal/context/context.go

+ 1 - 0
Taskfile.yml

@@ -34,6 +34,7 @@ tasks:
       - conf/**/*
       - conf/**/*
       - public/**/*
       - public/**/*
       - templates/**/*
       - templates/**/*
+      - custom/**/*
     method: timestamp
     method: timestamp
 
 
   generate-schemadoc:
   generate-schemadoc:

+ 1 - 1
internal/context/context.go

@@ -289,7 +289,7 @@ func Contexter() macaron.Handler {
 		// 🚨 SECURITY: Prevent MIME type sniffing in some browsers,
 		// 🚨 SECURITY: Prevent MIME type sniffing in some browsers,
 		// see https://github.com/gogs/gogs/issues/5397 for details.
 		// see https://github.com/gogs/gogs/issues/5397 for details.
 		c.Header().Set("X-Content-Type-Options", "nosniff")
 		c.Header().Set("X-Content-Type-Options", "nosniff")
-		c.Header().Set("X-Frame-Options", "DENY")
+		c.Header().Set("X-Frame-Options", "deny")
 
 
 		ctx.Map(c)
 		ctx.Map(c)
 	}
 	}