diff --git a/app/security/NonceFilter.scala b/app/security/NonceFilter.scala index 12362f9bd..d2542dc3a 100644 --- a/app/security/NonceFilter.scala +++ b/app/security/NonceFilter.scala @@ -33,11 +33,10 @@ class NonceFilter @Inject() (implicit val mat: Materializer) extends Filter { val nonce = generateNonce next(request.addAttr(NonceFilter.NonceKey, nonce)).map { result => if(result.header.headers.contains("Content-Security-Policy")) { - result.withHeaders("Content-Security-Policy" -> result.header.headers("Content-Security-Policy") - .replace("%NONCE-SOURCE%", s"nonce-$nonce")) + result.withHeaders("Content-Security-Policy" -> result.header.headers("Content-Security-Policy").replace("%NONCE-SOURCE%", s"nonce-$nonce")) + } else { + result } - - result } } diff --git a/build.sbt b/build.sbt index f43e0b68f..d41e3e1ba 100755 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ name := "ore" -version := "1.6.0" +version := "1.6.1" lazy val `ore` = (project in file(".")).enablePlugins(PlayScala)