Skip to content

Commit

Permalink
allow redirects on Bridgy, Bridgy Fed, and appspot.com
Browse files Browse the repository at this point in the history
fixes #118. as far as we can tell, this is probably the root cause of many of these bugs filed against webmention.io over the last couple years, https://github.com/aaronpk/webmention.io/issues , eg #188, #187, #175, #173, etc.

@aaronpk [said](https://chat.indieweb.org/dev/2023-08-07#t1691382116891200):
> That was apparently added 8 years ago
> i vaguely remember some old issue with appspot URLs that I had to work around

that appspot URL issue was probably that it required SNI for SSL, which was less supported then, and much more widely supported now, so I'm pretty sure this change is ok.

cc @osa_k
  • Loading branch information
snarfed committed Aug 11, 2023
1 parent 438430f commit fb4487e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function build_url($parsed_url) {

function should_follow_redirects($url) {
$host = parse_url($url, PHP_URL_HOST);
if(preg_match('/brid\.gy|appspot\.com|blogspot\.com|youtube\.com/', $host)) {
if(preg_match('/blogspot\.com|youtube\.com/', $host)) {
return false;
} else {
return true;
Expand All @@ -66,4 +66,4 @@ function allow_iframe_video($value = NULL) {
$allow_iframe_video = $value;

return $allow_iframe_video;
}
}

0 comments on commit fb4487e

Please # to comment.