mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 11:20:56 +00:00
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
@ -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…
Reference in New Issue
Block a user