Mercurial > prosody-modules
comparison mod_register_redirect/mod_register_redirect.lua @ 2729:7983335e88e9
mod_register_redirect: Add ::1 to the default registration_whitelist.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Sun, 16 Jul 2017 19:28:52 +0100 |
| parents | 7dbde05b48a9 |
| children | ba999840f318 |
comparison
equal
deleted
inserted
replaced
| 2728:11fdfd73a527 | 2729:7983335e88e9 |
|---|---|
| 6 -- Redirects IP addresses not in the whitelist to a web page or another method to complete the registration. | 6 -- Redirects IP addresses not in the whitelist to a web page or another method to complete the registration. |
| 7 | 7 |
| 8 local st = require "util.stanza" | 8 local st = require "util.stanza" |
| 9 local cman = configmanager | 9 local cman = configmanager |
| 10 | 10 |
| 11 local ip_wl = module:get_option_set("registration_whitelist", { "127.0.0.1" }) | 11 local ip_wl = module:get_option_set("registration_whitelist", { "127.0.0.1", "::1" }) |
| 12 local url = module:get_option_string("registration_url", nil) | 12 local url = module:get_option_string("registration_url", nil) |
| 13 local inst_text = module:get_option_string("registration_text", nil) | 13 local inst_text = module:get_option_string("registration_text", nil) |
| 14 local oob = module:get_option_boolean("registration_oob", true) | 14 local oob = module:get_option_boolean("registration_oob", true) |
| 15 local admins_g = cman.get("*", "core", "admins") | 15 local admins_g = cman.get("*", "core", "admins") |
| 16 local admins_l = cman.get(module:get_host(), "core", "admins") | 16 local admins_l = cman.get(module:get_host(), "core", "admins") |
