You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/06/29 16:31:38 UTC

[GitHub] rabbah commented on a change in pull request #2444: Display CORS Headers for Non-Options Requests

rabbah commented on a change in pull request #2444: Display CORS Headers for Non-Options Requests
URL: https://github.com/apache/incubator-openwhisk/pull/2444#discussion_r124850078
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/cli/test/WskWebActionsTests.scala
 ##########
 @@ -230,6 +230,25 @@ trait WskWebActionsTests
             response.header("Access-Control-Allow-Headers") shouldBe "Headers set from Web Action"
     }
 
+    it should "ensure that CORS header is preserved for non-custom options" in withAssetCleaner(wskprops) {
+        (wp, assetHelper) =>
+            val name = "webaction"
+            val file = Some(TestUtils.getTestActionFilename("corsHeaderMod.js"))
+
+            assetHelper.withCleaner(wsk.action, name) {
+                (action, _) =>
+                    action.create(name, file, web = Some("true"))
+            }
+
+            val host = getServiceURL()
+            val url = host + s"$testRoutePath/$namespace/default/webaction.http"
 
 Review comment:
   want to test this for non `.http` extension also.
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services