Поправки для поддержки reverse-proxy, рефакторинг

This commit is contained in:
Book Pauk
2022-12-04 17:12:24 +07:00
parent 105680e38a
commit 409befce5e
6 changed files with 123 additions and 82 deletions

View File

@@ -68,7 +68,8 @@ class RemoteLib {
const buf = await this.down.load(`${this.remoteHost}${link}`, {decompress: false});
const publicPath = `${this.config.publicFilesDir}${link}`;
const hash = path.basename(link);
const publicPath = `${this.config.bookDir}/${hash}`;
await fs.writeFile(publicPath, buf);