]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
redirect /portal to /portal/index.html
authorSeven Du <dujinfang@gmail.com>
Tue, 13 Aug 2013 01:28:14 +0000 (09:28 +0800)
committerSeven Du <dujinfang@gmail.com>
Tue, 13 Aug 2013 10:30:19 +0000 (18:30 +0800)
src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c

index f8b143b054f839985efb849551f8c22efe5ba764..3db20be69be0ee497109f2e897461de0faafe8c4 100644 (file)
@@ -704,6 +704,12 @@ abyss_bool auth_hook(TSession * r)
                return websocket_hook(r);
        }
 
+       if (!strncmp(r->requestInfo.uri, "/portal", 7) && strlen(r->requestInfo.uri) <= 8) {
+               ResponseAddField(r, "Location", "/portal/index.html");
+               ResponseStatus(r, 302);
+               return TRUE;
+       }
+
        if (!strncmp(r->requestInfo.uri, "/domains/", 9)) {
                domain_name = strdup(r->requestInfo.uri + 9);
                switch_assert(domain_name);