From 3ed8761e88cda13b687a9df0a38d7acbeff043b4 Mon Sep 17 00:00:00 2001 From: Ewout Van Schil Date: Sun, 15 Jul 2018 19:13:40 +0200 Subject: [PATCH] Fix issue & bump version --- app/security/NonceFilter.scala | 7 +++---- build.sbt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) 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)