summaryrefslogtreecommitdiffstats
path: root/wsd
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-05-04 12:32:24 -0400
committerpedropintosilva <65948705+pedropintosilva@users.noreply.github.com>2021-08-06 17:21:18 +0200
commit9266fa57936e68bbac512d109c90b565af181834 (patch)
treee4cc5c21caa3161298c8518d4d0fec1007a25ca7 /wsd
parentloleaflet: handle iframe load error (diff)
downloadonline-9266fa57936e68bbac512d109c90b565af181834.tar.gz
online-9266fa57936e68bbac512d109c90b565af181834.zip
add option --with-feedback-location
Change-Id: I2f5b1556f0b976e9c3cb1f78383d2d05e6aef892 Signed-off-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'wsd')
-rw-r--r--wsd/FileServer.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index c4eaf6a83d..2969839d57 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -61,13 +61,6 @@ std::map<std::string, std::pair<std::string, std::string>> FileServerRequestHand
/// welcome.html if no lang matches.
#define WELCOME_ENDPOINT "/loleaflet/dist/welcome"
-
-#ifdef ENABLE_FEEDBACK
-#define RATE_LOCATION "http://127.0.0.1:8000/Rate/feedback.html"
-#else
-#define RATE_LOCATION ""
-#endif
-
namespace {
int functionConversation(int /*num_msg*/, const struct pam_message** /*msg*/,
@@ -784,7 +777,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
if (config.getBool("security.enable_macros_execution", false))
enableMacrosExecution = "true";
Poco::replaceInPlace(preprocess, std::string("%ENABLE_MACROS_EXECUTION%"), enableMacrosExecution);
- Poco::replaceInPlace(preprocess, std::string("%FEEDBACK_LOCATION%"), std::string(RATE_LOCATION));
+ Poco::replaceInPlace(preprocess, std::string("%FEEDBACK_LOCATION%"), std::string(FEEDBACK_LOCATION));
// Capture cookies so we can optionally reuse them for the storage requests.
{
@@ -806,7 +799,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
// iframe purposes.
std::ostringstream cspOss;
cspOss << "Content-Security-Policy: default-src 'none'; "
- "frame-src 'self' " << RATE_LOCATION << " blob: " << documentSigningURL << "; "
+ "frame-src 'self' " << FEEDBACK_LOCATION << " blob: " << documentSigningURL << "; "
"connect-src 'self' " << cnxDetails.getWebSocketUrl() << "; "
"script-src 'unsafe-inline' 'self'; "
"style-src 'self' 'unsafe-inline'; "