28 LOG(VB_HTTP, LOG_INFO, QString(
"Rewriting request to new file '%1'").arg(File));
61 (
Request->m_fileName.endsWith(
".js") ||
Request->m_fileName.endsWith(
".css")))
63 LOG(VB_HTTP, LOG_INFO, QString(
"Rewriting request %1 to web app '%2'")
65 int ix = File.lastIndexOf(
'/');
66 Request->m_path =
"/" + File.left(ix+1);
70 else if (!File.isEmpty()
72 ||
Request->m_path ==
"/dashboard/" ||
Request->m_path ==
"/setupwizard/"
73 ||
Request->m_path ==
"/MythFE/"))
75 LOG(VB_HTTP, LOG_INFO, QString(
"Rewriting request to web app '%1'").arg(File));
static HTTPResponse ProcessFile(const HTTPRequest2 &Request)
static HTTPResponse RewriteFile(const HTTPRequest2 &Request, const QString &File)
A convenience method to seemlessly redirect requests for files to a context specific file.
static HTTPResponse RewriteToSPA(const HTTPRequest2 &Request, const QString &File)
A convenience method to seemlessly redirect requests to a Single Page web app (SPA)
std::shared_ptr< MythHTTPRequest > HTTPRequest2
std::shared_ptr< MythHTTPResponse > HTTPResponse
#define LOG(_MASK_, _LEVEL_, _QSTRING_)