mdedetrich commented on code in PR #106:
URL:
https://github.com/apache/incubator-pekko-grpc/pull/106#discussion_r1252847527
##########
runtime/src/main/scala/org/apache/pekko/grpc/scaladsl/WebHandler.scala:
##########
@@ -15,23 +15,24 @@ package org.apache.pekko.grpc.scaladsl
import scala.collection.immutable
import scala.concurrent.Future
+import com.typesafe.config.ConfigFactory
import org.apache.pekko
-import pekko.actor.ClassicActorSystemProvider
+import pekko.actor.{ ActorSystem, ClassicActorSystemProvider }
import pekko.annotation.ApiMayChange
+import pekko.http.cors.scaladsl.CorsDirectives.cors
+import pekko.http.cors.scaladsl.model.HttpHeaderRange
+import pekko.http.cors.scaladsl.settings.CorsSettings
import pekko.http.javadsl.{ model => jmodel }
import pekko.http.scaladsl.model.{ HttpMethods, HttpRequest, HttpResponse }
import pekko.http.scaladsl.model.headers._
import pekko.http.scaladsl.server.Route
import pekko.http.scaladsl.server.directives.MarshallingDirectives.handleWith
-import ch.megard.pekko.http.cors.scaladsl.CorsDirectives.cors
-import ch.megard.pekko.http.cors.scaladsl.model.HttpHeaderRange
-import ch.megard.pekko.http.cors.scaladsl.settings.CorsSettings
@ApiMayChange
object WebHandler {
/** Default CORS settings to use for grpc-web */
- val defaultCorsSettings: CorsSettings = CorsSettings.defaultSettings
+ val defaultCorsSettings: CorsSettings = CorsSettings(ConfigFactory.load())
Review Comment:
@lomigmegard So I am trying to get rid of the now deprecated
`CorsSettings.defaultSettings`, do you think this is fine for now given that we
don't want to change the API for the first release?
I suspect that this API can use improvements in future versions (and it is
marked as `@ApiMayChange`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]