We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efecc07 commit 5486156Copy full SHA for 5486156
lib/cors.lua
@@ -98,12 +98,14 @@ end
98
function cors_request(txn, allowed_methods, allowed_origins, allowed_headers)
99
local headers = txn.http:req_get_headers()
100
local transaction_data = {}
101
+ local origin = nil
102
103
if headers["origin"] ~= nil and headers["origin"][0] ~= nil then
104
core.Debug("CORS: Got 'Origin' header: " .. headers["origin"][0])
- transaction_data["origin"] = headers["origin"][0]
105
+ origin = headers["origin"][0]
106
end
-
107
+
108
+ transaction_data["origin"] = origin
109
transaction_data["allowed_methods"] = allowed_methods
110
transaction_data["allowed_origins"] = allowed_origins
111
transaction_data["allowed_headers"] = allowed_headers
0 commit comments