BBlack has submitted this change and it was merged.

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


Forward Accept also for /api/rest_v1/?doc

/?doc was the canonical doc URL so far, so make sure that it keeps working by
forwarding Accept as well.

Follow-up to I2fbcbd97fb1335061519dbee1e7222ae8e5c8617.

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

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/templates/varnish/text-common.inc.vcl.erb 
b/templates/varnish/text-common.inc.vcl.erb
index 67eb71d..a990b8d 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: merged
Gerrit-Change-Id: I4aaa09a839b4a08c392e8fa70f91a3c4a7da10a6
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Elukey <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to