aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/schemes/NullRpcSchemeHandler.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/schemes/NullRpcSchemeHandler.hpp b/src/schemes/NullRpcSchemeHandler.hpp
index ef9cd09..b4bb216 100644
--- a/src/schemes/NullRpcSchemeHandler.hpp
+++ b/src/schemes/NullRpcSchemeHandler.hpp
@@ -16,10 +16,10 @@ public:
void requestStarted(QWebEngineUrlRequestJob *job) override {
auto url = job->requestUrl();
- qDebug() << "REQ" << url << "From: " << job->initiator();
- // TODO: Validate origin
+ auto origin = job->initiator();
+ qDebug() << "REQ" << url << " | From: " << job->initiator();
- if (url.host().isEmpty() || url.host() == "noop") {
+ if (origin.scheme() != "nullrpc" || url.host().isEmpty() || url.host() == "noop") {
job->reply("text/html", new QBuffer(job));
return;
}