From 44060da5776a47deb3ee92a9f66d5b4bff770333 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Tue, 21 Jun 2016 16:11:08 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20send=20webmentions=20to=20onses?= =?UTF-8?q?elf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Jobs/SendWebMentions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Jobs/SendWebMentions.php b/app/Jobs/SendWebMentions.php index 9f9d70a0..fb80d69e 100644 --- a/app/Jobs/SendWebMentions.php +++ b/app/Jobs/SendWebMentions.php @@ -61,6 +61,11 @@ class SendWebMentions extends Job implements ShouldQueue */ private function discoverWebmentionEndpoint($url) { + //let’s not send webmentions to myself + if (parse_url($url, PHP_URL_HOST) == env('LONG_URL', 'localhost')) { + return false; + } + $endpoint = null; $response = $this->guzzle->get($url);