GWicke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/303825

Change subject: Forward Accept also for /api/rest_v1/?doc
......................................................................

Forward Accept also for /api/rest_v1/?doc

Follow-up to I2fbcbd97fb1335061519dbee1e7222ae8e5c8617.

Change-Id: I4aaa09a839b4a08c392e8fa70f91a3c4a7da10a6
---
M templates/varnish/text-common.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/303825/1

diff --git a/templates/varnish/text-common.inc.vcl.erb 
b/templates/varnish/text-common.inc.vcl.erb
index 67eb71d..c556cf3 100644
--- a/templates/varnish/text-common.inc.vcl.erb
+++ b/templates/varnish/text-common.inc.vcl.erb
@@ -68,7 +68,7 @@
 
        // Normalize Accept headers for the REST API: Ignore unless a profile is
        // specified or this is a request for the root REST URI
-       if (req.url ~ "^/api/rest_v1/?$" && req.http.Accept ~ "text/html") {
+       if (req.url ~ "^/api/rest_v1/(\?doc)?$" && req.http.Accept ~ 
"text/html") {
                set req.http.Accept = "text/html";
        } else if (req.url ~ "^/api/rest_v1/" && req.http.Accept !~ 
{"profile="https://www.mediawiki.org/wiki/Specs/"}) {
                unset req.http.Accept;

-- 
To view, visit https://gerrit.wikimedia.org/r/303825
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4aaa09a839b4a08c392e8fa70f91a3c4a7da10a6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to