Software /
code /
prosody
Comparison
plugins/mod_http.lua @ 13141:451cb119026e
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Jun 2023 13:06:05 +0200 |
parent | 13140:7a6874f9fd40 |
parent | 13139:5d5869f14c4d |
child | 13165:9c13c11b199d |
comparison
equal
deleted
inserted
replaced
13140:7a6874f9fd40 | 13141:451cb119026e |
---|---|
153 local app_methods = opt_methods; | 153 local app_methods = opt_methods; |
154 local app_headers = opt_headers; | 154 local app_headers = opt_headers; |
155 local app_credentials = opt_credentials; | 155 local app_credentials = opt_credentials; |
156 local app_origins; | 156 local app_origins; |
157 if opt_origins and not (opt_origins:empty() or opt_origins:contains("*")) then | 157 if opt_origins and not (opt_origins:empty() or opt_origins:contains("*")) then |
158 opt_origins = opt_origins._items; | 158 app_origins = opt_origins._items; |
159 end | 159 end |
160 | 160 |
161 local function cors_handler(event_data) | 161 local function cors_handler(event_data) |
162 local request, response = event_data.request, event_data.response; | 162 local request, response = event_data.request, event_data.response; |
163 apply_cors_headers(response, app_methods, app_headers, opt_max_age, app_credentials, app_origins, request.headers.origin); | 163 apply_cors_headers(response, app_methods, app_headers, opt_max_age, app_credentials, app_origins, request.headers.origin); |