You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/07/26 18:55:31 UTC

[GitHub] mhamann closed pull request #317: Add additional headers to remove when cors is disabled

mhamann closed pull request #317: Add additional headers to remove when cors is disabled
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/317
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scripts/lua/cors.lua b/scripts/lua/cors.lua
index 8c0b1f5..10deee8 100644
--- a/scripts/lua/cors.lua
+++ b/scripts/lua/cors.lua
@@ -44,6 +44,8 @@ function _M.replaceHeaders()
       ngx.header['Access-Control-Allow-Methods'] = nil
       ngx.header['Access-Control-Allow-Headers'] = nil
       ngx.header['Access-Control-Allow-Credentials'] = nil
+      ngx.header['Access-Control-Expose-Headers'] = nil
+      ngx.header['Access-Control-Max-Age'] = nil
     else
       ngx.header['Access-Control-Allow-Origin'] = ngx.var.cors_origins == 'true' and (ngx.var.http_origin or '*') or ngx.var.cors_origins
       ngx.header['Access-Control-Allow-Methods'] = ngx.var.cors_methods or 'GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS'


 

----------------------------------------------------------------
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