Commit eeae0962 authored by nanahira's avatar nanahira

allow full format key

parent 58bd79c9
......@@ -167,7 +167,7 @@ CLIENT_use_cdkey = (client, pkey) ->
return 0 unless settings.modules.vip.enabled and pkey
found_type = null
for type,keys of vip_info.cdkeys
for key in keys when pkey == key
for key in keys when pkey == key or pkey == (type + "D" + settings.port + ":" + key) # support web given format
found_type = parseInt(type)
index = _.indexOf(keys, key)
keys.splice(index, 1) unless index == -1
......
......@@ -185,7 +185,7 @@
keys = ref[type];
for (j = 0, len = keys.length; j < len; j++) {
key = keys[j];
if (!(pkey === key)) {
if (!(pkey === key || pkey === (type + "D" + settings.port + ":" + key))) {
continue;
}
found_type = parseInt(type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment