Comparison

mod_http_upload/mod_http_upload.lua @ 3446:a5a50cd34386

mod_http_upload: Fix indentation Who used spaces?!
author Kim Alvefur <zash@zash.se>
date Fri, 18 Jan 2019 02:16:03 +0100
parent 3380:765735bb590b
child 3549:b059a3fb2a58
comparison
equal deleted inserted replaced
3445:19924a2c4a48 3446:a5a50cd34386
229 measure_upload = module:measure("upload", "sizes"); 229 measure_upload = module:measure("upload", "sizes");
230 end 230 end
231 231
232 -- http service 232 -- http service
233 local function set_cross_domain_headers(response) 233 local function set_cross_domain_headers(response)
234 local headers = response.headers; 234 local headers = response.headers;
235 headers.access_control_allow_methods = "GET, PUT, OPTIONS"; 235 headers.access_control_allow_methods = "GET, PUT, OPTIONS";
236 headers.access_control_allow_headers = "Content-Type"; 236 headers.access_control_allow_headers = "Content-Type";
237 headers.access_control_max_age = "7200"; 237 headers.access_control_max_age = "7200";
238 headers.access_control_allow_origin = response.request.headers.origin or "*"; 238 headers.access_control_allow_origin = response.request.headers.origin or "*";
239 return response; 239 return response;
240 end 240 end
241 241
242 local function upload_data(event, path) 242 local function upload_data(event, path)
243 set_cross_domain_headers(event.response); 243 set_cross_domain_headers(event.response);
244 244