Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
* Ads csp

* remove useless thing
Cette révision appartient à :
Miiiiaaooooo 2017-09-06 02:18:37 +01:00 révisé par ewhal
Parent 13cc4eaa68
révision ed4990d313

Voir le fichier

@ -75,7 +75,7 @@ func ScopesRequired(scopes ...string) gin.HandlerFunc {
// CSP set Content Security Policy http header // CSP set Content Security Policy http header
func CSP() gin.HandlerFunc { func CSP() gin.HandlerFunc {
return func(c *gin.Context) { return func(c *gin.Context) {
c.Header("Content-Security-Policy", "default-src 'self'; img-src * data:; media-src *; style-src 'self' maxcdn.bootstrapcdn.com fonts.googleapis.com 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' fonts.gstatic.com maxcdn.bootstrapcdn.com") c.Header("Content-Security-Policy", "default-src 'self'; img-src * data:; media-src *; style-src 'self' maxcdn.bootstrapcdn.com fonts.googleapis.com 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' a-ads.com *.a-ads.com; font-src 'self' fonts.gstatic.com maxcdn.bootstrapcdn.com; child-src ad.a-ads.com a-ads.com *.a-ads.com")
c.Next() c.Next()
} }
} }