You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "lomigmegard (via GitHub)" <gi...@apache.org> on 2023/07/06 12:02:16 UTC
[GitHub] [incubator-pekko-grpc] lomigmegard commented on a diff in pull request #106: Update latest pekko-http to bring in cors
lomigmegard commented on code in PR #106:
URL: https://github.com/apache/incubator-pekko-grpc/pull/106#discussion_r1254338735
##########
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:
@mdedetrich that should be fine yes, given the constraints of not changing the interface of this field.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org