plugins/mod_http.lua
changeset 13213 c8d949cf6b09
parent 13169 9c13c11b199d
child 13217 50324f66ca2a
--- a/plugins/mod_http.lua	Sun Jul 16 21:04:42 2023 +0200
+++ b/plugins/mod_http.lua	Sun Jul 16 20:49:33 2023 +0200
@@ -38,7 +38,7 @@
 local opt_headers = module:get_option_set("access_control_allow_headers", { "Content-Type" });
 local opt_origins = module:get_option_set("access_control_allow_origins");
 local opt_credentials = module:get_option_boolean("access_control_allow_credentials", false);
-local opt_max_age = module:get_option_number("access_control_max_age", 2 * 60 * 60);
+local opt_max_age = module:get_option_period("access_control_max_age", "2 hours");
 local opt_default_cors = module:get_option_boolean("http_default_cors_enabled", true);
 
 local function get_http_event(host, app_path, key)