mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Prevent autoupdate from Cordova apps built with Meteor < 1.3
Not setting the Access-Control-Allow-Origin header avoids Cordova apps built with Meteor < 1.3 from downloading manifest.json and thus blocks autoupdate.
This commit is contained in:
@@ -403,10 +403,6 @@ WebAppInternals.staticFilesMiddleware = function (staticFiles, req, res, next) {
|
||||
res.setHeader("Content-Type", "text/css; charset=UTF-8");
|
||||
} else if (info.type === "json") {
|
||||
res.setHeader("Content-Type", "application/json; charset=UTF-8");
|
||||
// XXX if it is a manifest we are serving, set additional headers
|
||||
if (/\/manifest\.json$/.test(pathname)) {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
}
|
||||
}
|
||||
|
||||
if (info.hash) {
|
||||
|
||||
Reference in New Issue
Block a user