[server] host from args
This commit is contained in:
@@ -31,9 +31,9 @@ class Init {
|
||||
private static function getHost():String {
|
||||
#if flash
|
||||
var url = Lib.current.loaderInfo.url;
|
||||
var r:EReg = ~/((app|https?):\/\/?[-_\w\d\.]+(:\d+)?)\/?/;
|
||||
if (r.match(url) && !(r.matched(2) == "app")) {
|
||||
return r.matched(1);
|
||||
var r:EReg = ~/(app|https?):\/\/?([-_\w\d\.]+)(:\d+)?\/?/;
|
||||
if (r.match(url) && !(r.matched(1) == "app")) {
|
||||
return r.matched(2);
|
||||
} else {
|
||||
return "localhost";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user