Hello BBlack,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/294016
to review the following change.
Change subject: Add explanatory comments to CORS-related VCL for upload cluster
......................................................................
Add explanatory comments to CORS-related VCL for upload cluster
Change-Id: I83379eaeff193b5db369b0e3b76caa8ca40663a0
---
M templates/varnish/upload-frontend.inc.vcl.erb
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/16/294016/1
diff --git a/templates/varnish/upload-frontend.inc.vcl.erb
b/templates/varnish/upload-frontend.inc.vcl.erb
index 9124973..db55c0a 100644
--- a/templates/varnish/upload-frontend.inc.vcl.erb
+++ b/templates/varnish/upload-frontend.inc.vcl.erb
@@ -90,7 +90,25 @@
}
set resp.http.Access-Control-Allow-Origin = "*";
+
+ // Headers exposed for CORS:
+ // - Age, Content-Length, Date, X-Cache, X-Varnish: used by
MultimediaViewer
+ // for client-side performance metrics (1cb80099d97ad).
+ //
+ // - X-Content-Duration: used for OGG audio and video files
(7077999966).
+ // Firefox 41 dropped support for this header, but OGV.js still
supports it.
+ // See <https://bugzilla.mozilla.org/show_bug.cgi?id=1160695#c27> and
+ // <https://github.com/brion/ogv.js/issues/88>.
+ //
+ // - Content-Range: indicates total file and actual range returned for
RANGE
+ // requests (939b436512). Used by ogv.js to eliminate an extra HEAD
request
+ // to get the the total file size.
set resp.http.Access-Control-Expose-Headers = "Age, Date,
Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish";
+
+ // "Timing-Allow-Origin" is part of the Resource Timing specification
+ // (https://www.w3.org/TR/resource-timing/). Setting this header allows
+ // JavaScript with a different origin to access resource timing info
+ // (e9cbfd539edd3). See <https://phabricator.wikimedia.org/T76020>.
set resp.http.Timing-Allow-Origin = "*";
}
--
To view, visit https://gerrit.wikimedia.org/r/294016
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83379eaeff193b5db369b0e3b76caa8ca40663a0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits