diff --git a/wsd/COOLWSD.cpp b/wsd/COOLWSD.cpp index 5ba9d0cad4..ca3c902694 100644 --- a/wsd/COOLWSD.cpp +++ b/wsd/COOLWSD.cpp @@ -2297,6 +2297,7 @@ void COOLWSD::innerInitialize(Application& self) ? COOLWSD::WASMActivationState::Enabled : COOLWSD::WASMActivationState::Disabled; +#if ENABLE_DEBUG if (getConfigValue(conf, "wasm.force", false)) { if (COOLWSD::WASMState != COOLWSD::WASMActivationState::Enabled) @@ -2310,6 +2311,7 @@ void COOLWSD::innerInitialize(Application& self) LOG_INF("WASM is force-enabled. All documents will be loaded through WASM"); COOLWSD::WASMState = COOLWSD::WASMActivationState::Forced; } +#endif #endif // !MOBILEAPP // Get anonymization settings. diff --git a/wsd/COOLWSD.hpp b/wsd/COOLWSD.hpp index de4f055675..36bf275bd3 100644 --- a/wsd/COOLWSD.hpp +++ b/wsd/COOLWSD.hpp @@ -300,7 +300,7 @@ public: { Disabled, Enabled -#ifdef ENABLE_DEBUG +#if ENABLE_DEBUG , Forced //< When Forced, only WASM is served. #endif diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index d17a66b80b..0a6bd97b6a 100644 --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -950,11 +950,13 @@ std::string FileServerRequestHandler::getRequestPathname(const HTTPRequest& requ #if !MOBILEAPP bool isWasm = false; +#if ENABLE_DEBUG if (COOLWSD::WASMState == COOLWSD::WASMActivationState::Forced) { isWasm = (path.find("/browser/dist/wasm/") == std::string::npos); } else +#endif { const std::string wopiSrc = requestDetails.getLineModeKey(std::string()); if (!wopiSrc.empty())