kopia lustrzana https://github.com/c9/core
Avoid downloading from subsubdomains like ide.newclient-lennnartcl.c9.io
Since these don't have a valid certificate, they don't support cachingpull/117/merge
rodzic
2c656ebb3a
commit
27170b3454
|
@ -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": {}
|
||||
|
|
Ładowanie…
Reference in New Issue