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_r124850453
 
 

 ##########
 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:
   that is for both .http and .json, the controller should be adding the 
expected headers for access control. 
   furthermore, let's make sure we're not overriding and removing other headers 
and the test action should have other headers included.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to