Avoid downloading from subsubdomains like ide.newclient-lennnartcl.c9.io

Since these don't have a valid certificate, they don't support caching
pull/117/merge
Lennart Kats 2015-06-21 12:05:16 +00:00
rodzic 2c656ebb3a
commit 27170b3454
1 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -17,21 +17,21 @@ function plugin(options, imports, register) {
var apiBaseUrl = options.apiBaseUrl;
var vfsBaseUrl = options.vfsBaseUrl;
connectStatic.getRequireJsConfig().baseUrlLoadBalancers = [
ideBaseUrl,
var balancers = [
baseUrl + "/uph",
// We could include others but dogfooding URLs like
// vfs.newclient-lennartcl.c9.io don't have a cert, so
// let's not
// apiBaseUrl + "/uph",
// vfsBaseUrl + "/uph",
];
assert(connectStatic.getRequireJsConfig().baseUrlLoadBalancers);
if (!options.avoidSubdomains)
balancers.push(
ideBaseUrl
// We could include others but dogfooding URLs like
// vfs.newclient-lennartcl.c9.io don't have a cert, so
// let's not
// apiBaseUrl + "/uph",
// vfsBaseUrl + "/uph"
);
function cacheForever(req, res, next) {
res.setHeader("Cache-Control", "public, max-age=31556926");
next();
}
connectStatic.getRequireJsConfig().baseUrlLoadBalancers = balancers;
assert(connectStatic.getRequireJsConfig().baseUrlLoadBalancers);
register(null, {
"unpacked_helper": {}