Allow env-var to affect serving from the FS only in debug mode.
Change-Id: I5e5d176295807af4de3e802ca02a0e1a1c17646e
This commit is contained in:
parent
3aec6e1227
commit
0088c14850
1 changed files with 3 additions and 1 deletions
|
@ -207,6 +207,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M
|
|||
|
||||
bool gzip = request.hasToken("Accept-Encoding", "gzip");
|
||||
const std::string *content;
|
||||
#ifdef ENABLE_DEBUG
|
||||
if (std::getenv("LOOL_SERVE_FROM_FS"))
|
||||
{
|
||||
// Useful to not serve from memory sometimes especially during loleaflet development
|
||||
|
@ -215,7 +216,8 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M
|
|||
HttpHelper::sendFile(socket, filePath, mimeType, response, noCache);
|
||||
return;
|
||||
}
|
||||
else if (gzip)
|
||||
#endif
|
||||
if (gzip)
|
||||
{
|
||||
response.set("Content-Encoding", "gzip");
|
||||
content = getCompressedFile(relPath);
|
||||
|
|
Loading…
Reference in a new issue