CLOUD: Redirect to "/files" from "/"
"/" is used to receive "?code", but when there is no such parameter passed, it's safe to redirect user to the "/files".
This commit is contained in:
parent
b37b392fa0
commit
0a43dad629
1 changed files with 12 additions and 2 deletions
|
@ -35,8 +35,18 @@ IndexPageHandler::~IndexPageHandler() {}
|
|||
void IndexPageHandler::handle(Client &client) {
|
||||
Common::String code = client.queryParameter("code");
|
||||
|
||||
if (code == "") {
|
||||
HandlerUtils::setMessageHandler(client, _("This is a local webserver index page."));
|
||||
if (code == "") {
|
||||
// redirect to "/files"
|
||||
HandlerUtils::setMessageHandler(
|
||||
client,
|
||||
Common::String::format(
|
||||
"%s<br/><a href=\"files\">%s</a>",
|
||||
_("This is a local webserver index page."),
|
||||
client.queryParameter("path").c_str(),
|
||||
_("Open Files manager")
|
||||
),
|
||||
"/files"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue