Mark Bergsma has submitted this change and it was merged. Change subject: Fix proxy rewriting ......................................................................
Fix proxy rewriting Change-Id: Id21531d2ee566932f2cdd49e2eb9a94d946663ec --- M templates/varnish/wikimedia.vcl.erb 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/wikimedia.vcl.erb b/templates/varnish/wikimedia.vcl.erb index f581e50..b65e52b 100644 --- a/templates/varnish/wikimedia.vcl.erb +++ b/templates/varnish/wikimedia.vcl.erb @@ -173,9 +173,7 @@ # Functions sub rewrite_proxy_urls { - if (req.url ~ "^http:") { - set req.url = regsub ( req.url, "^http://[\w.]+(/.*)", "\1"); - } + set req.url = regsub(req.url, "^http://[^/]+", ""); } sub vcl_recv_purge { @@ -185,8 +183,8 @@ error 405 "Denied."; # This is a stupid hack to make varnishhtcpd work - it's using a perl mod that sends purge reqs like # PURGE http://de.wikipedia.orghttp://de.wikipedia.org/w/index.php - } else { - call rewrite_proxy_urls; + } elsif (req.url ~ "^http:") { + set req.url = regsub(req.url, "^http://[\w.]+(/.*)", "\1"); } return (lookup); } -- To view, visit https://gerrit.wikimedia.org/r/60415 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id21531d2ee566932f2cdd49e2eb9a94d946663ec Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma <m...@wikimedia.org> Gerrit-Reviewer: Mark Bergsma <m...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits