mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Set the asset server to use jp cdn for now
This commit is contained in:
parent
156034fec7
commit
3fb178f24f
1 changed files with 2 additions and 4 deletions
|
@ -19,11 +19,9 @@ app.get('/*', function (req, res) {
|
|||
createDirFromFile(expectedPath);
|
||||
let downloading = [];
|
||||
if (fs.existsSync(expectedPath)) {
|
||||
const fileStream = fs.createReadStream(expectedPath);
|
||||
res.writeHead(200);
|
||||
fileStream.pipe(res);
|
||||
res.sendFile(expectedPath)
|
||||
} else {
|
||||
let url = (!req.url.toLowerCase().startsWith("android") ? "https://img-sif2.lovelive-sif2.com" : "https://album-sif2.lovelive-sif2.com") + req.url;
|
||||
let url = (req.url.toLowerCase().startsWith("/android") || req.url.toLowerCase().startsWith("/ios") ? "https://lovelive-schoolidolfestival2-assets.akamaized.net" : "https://lovelive-schoolidolfestival2-album.akamaized.net") + req.url;
|
||||
const request = require('https').get(url, function(response) {
|
||||
response.pipe(res);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue