mdedetrich commented on code in PR #106:
URL:
https://github.com/apache/incubator-pekko-grpc/pull/106#discussion_r1252872017
##########
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:
Making this refer to the `ActorSystem`'s config will require more
significant code changes, i.e. `defaultCorsSettings` will have to change to a
`def` and due to the usage of implicit default paramters in
https://github.com/mdedetrich/incubator-pekko-grpc/blob/0563fb1672c6ca831423d02925687c8635fd0d03/runtime/src/main/scala/org/apache/pekko/grpc/scaladsl/WebHandler.scala#L63
it will also require rewiring of code.
Or as you said it will need us to create a new actor system instance.
--
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]