Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit e8e866e

Browse files
authored
Merge pull request #4154 from prisma/MongoSSLBug
Add explicit dependency for netty
2 parents 4910d56 + c6813f3 commit e8e866e

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

server/build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ lazy val deployConnectorMongo = connectorProject("deploy-connector-mongo")
242242
.dependsOn(deployConnector)
243243
.dependsOn(mongoUtils)
244244
.settings(
245-
libraryDependencies ++= Seq(mongoClient)
245+
libraryDependencies ++= Seq(mongoClient) ++ netty
246246
)
247247

248248
lazy val apiConnector = connectorProject("api-connector")
@@ -272,7 +272,7 @@ lazy val apiConnectorPostgres = connectorProject("api-connector-postgres")
272272

273273
lazy val apiConnectorMongo = connectorProject("api-connector-mongo")
274274
.dependsOn(apiConnector)
275-
.settings(libraryDependencies ++= Seq(mongoClient),
275+
.settings(libraryDependencies ++= Seq(mongoClient) ++netty,
276276
scalacOptions := {
277277
val oldOptions = scalacOptions.value
278278
oldOptions.filterNot(_ == "-Xfatal-warnings")

server/libs/sangria-server/src/main/scala/com/prisma/sangria_server/AkkaHttpSangriaServer.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ import akka.actor.ActorSystem
44
import akka.http.scaladsl.Http
55
import akka.http.scaladsl.Http.ServerBinding
66
import akka.http.scaladsl.model.StatusCodes._
7+
import akka.http.scaladsl.model._
78
import akka.http.scaladsl.model.headers.RawHeader
89
import akka.http.scaladsl.model.ws.{Message, TextMessage}
9-
import akka.http.scaladsl.model._
1010
import akka.http.scaladsl.server.Directives.{as, entity, extractClientIP, _}
1111
import akka.http.scaladsl.server.directives.RouteDirectives.reject
1212
import akka.http.scaladsl.server.{ExceptionHandler, Route, UnsupportedWebSocketSubprotocolRejection}
1313
import akka.stream.ActorMaterializer
1414
import akka.stream.scaladsl.Flow
15-
import de.heikoseeberger.akkahttpplayjson.PlayJsonSupport
16-
import play.api.libs.json.{JsObject, JsValue, Json}
1715
import ch.megard.akka.http.cors.scaladsl.CorsDirectives
1816
import ch.megard.akka.http.cors.scaladsl.CorsDirectives._
1917
import com.prisma.akkautil.throttler.Throttler.ThrottlerException
18+
import de.heikoseeberger.akkahttpplayjson.PlayJsonSupport
19+
import play.api.libs.json.JsValue
2020

2121
import scala.concurrent.{Await, Future}
2222

@@ -35,9 +35,10 @@ case class AkkaHttpSangriaServer(
3535
)(implicit val system: ActorSystem, val materializer: ActorMaterializer)
3636
extends SangriaServer
3737
with PlayJsonSupport {
38-
import scala.concurrent.duration._
3938
import system.dispatcher
4039

40+
import scala.concurrent.duration._
41+
4142
val routes = {
4243
handleRejections(CorsDirectives.corsRejectionHandler) {
4344
cors() {

server/project/Dependencies.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ object Dependencies {
4242
val playJson = "com.typesafe.play" %% "play-json" % v.play
4343
val playStreams = "com.typesafe.play" %% "play-streams" % v.play
4444

45+
val nettyTransport = "io.netty" % "netty-transport" % "4.1.17.Final"
46+
val nettyHandler = "io.netty" % "netty-handler" % "4.1.17.Final"
47+
val netty = Seq(nettyTransport, nettyHandler)
48+
4549
val akka = "com.typesafe.akka" %% "akka-actor" % v.akka
4650
val akkaStream = "com.typesafe.akka" %% "akka-stream" % v.akka
4751
val akkaTestKit = "com.typesafe.akka" %% "akka-testkit" % v.akka

0 commit comments

Comments
 (0)