mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Asset server - support both jp and global
not like it matters
This commit is contained in:
parent
72c4f88e03
commit
b8f333e1e2
1 changed files with 6 additions and 1 deletions
|
@ -21,7 +21,12 @@ app.get('/*', function (req, res) {
|
|||
if (fs.existsSync(expectedPath)) {
|
||||
res.sendFile(expectedPath)
|
||||
} else {
|
||||
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;
|
||||
let url;
|
||||
if (req.url.split("/")[2].length !== 2) {
|
||||
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;
|
||||
} else {
|
||||
url = (req.url.toLowerCase().startsWith("/android") || req.url.toLowerCase().startsWith("/ios") ? "https://img-sif2.lovelive-sif2.com" : "https://album-sif2.lovelive-sif2.com") + req.url;
|
||||
}
|
||||
const request = require('https').get(url, function(response) {
|
||||
response.pipe(res);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue