rabbah commented on a change in pull request #2218: Port Controller from Spray 
to Akka
URL: 
https://github.com/apache/incubator-openwhisk/pull/2218#discussion_r132814012
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala
 ##########
 @@ -79,101 +77,82 @@ protected[controller] class SwaggerDocs(
     private def apiDocsUrl = basepath(apipath / swaggerdocpath)
 }
 
-/**
- * A singleton object which defines properties needed to instantiate a service 
for v1 or v2
- * of the REST API.
- */
 protected[controller] object RestApiCommons {
-    def requiredProperties =
-        WhiskConfig.whiskVersion ++
+    def requiredProperties = Map(WhiskConfig.servicePort -> 8080.toString) ++
+            WhiskConfig.whiskVersion ++
             WhiskAuthStore.requiredProperties ++
             WhiskEntityStore.requiredProperties ++
             WhiskActivationStore.requiredProperties ++
             EntitlementProvider.requiredProperties ++
             WhiskActionsApi.requiredProperties ++
             Authenticate.requiredProperties ++
             Collection.requiredProperties
-
-    /**
-     * The web actions API is available in both v1 and v2.
-     * It handles web actions.
-     */
-    protected[controller] class WebActionsApi(
-        override val webInvokePathSegments: Seq[String],
-        override val webApiDirectives: WebApiDirectives)(
-            implicit override val authStore: AuthStore,
-            implicit val entityStore: EntityStore,
-            override val activeAckTopicIndex: InstanceId,
-            override val activationStore: ActivationStore,
-            override val entitlementProvider: EntitlementProvider,
-            override val activationIdFactory: ActivationIdGenerator,
-            override val loadBalancer: LoadBalancerService,
-            override val actorSystem: ActorSystem,
-            override val executionContext: ExecutionContext,
-            override val logging: Logging,
-            override val whiskConfig: WhiskConfig)
-        extends WhiskWebActionsApi with WhiskServices
 }
 
 /**
- * A trait for wrapping routes with headers to include in response.
- * Useful for CORS.
- */
+  * A trait for wrapping routes with headers to include in response.
+  * Useful for CORS.
+  */
 protected[controller] trait RespondWithHeaders extends Directives {
-    val allowOrigin = `Access-Control-Allow-Origin`(AllOrigins)
+    val allowOrigin = `Access-Control-Allow-Origin`.*
 
 Review comment:
   ? 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to