alist icon indicating copy to clipboard operation
alist copied to clipboard

在子目录反代下的epub.js路径问题

Open notch1p opened this issue 2 years ago • 3 comments

Please make sure of the following things

  • [X] I have read the documentation.
  • [X] I'm sure there are no duplicate issues or discussions.
  • [X] I'm sure it's due to alist and not something else(such as Dependencies or Operational).
  • [X] I'm sure I'm using the latest version

Alist Version / Alist 版本

3.11.0

Driver used / 使用的存储驱动

does not matter

Describe the bug / 问题描述

根据Documentation: 3.7及之后版本默认添加

"EPUB.js":"/static/epub.js/viewer.html?url=$e_url"

对于设置了nginx二级目录反代的情况,如此设置会造成epub.js路径错误返回404的情况。 应该改为/{site_url}/static/epub.js/viewer.html?url=$e_url, 其中site_urldata/config.json的值(不带域名也可),个人测试正常。

个人建议顺便修正说明文档,小坑

Reproduction / 复现链接

上述条件下预览epub即可复现

Logs / 日志

Chrome console log: viewer.html:1 Failed to load resource: the server responded with a status of 404 (Not Found)

notch1p avatar Feb 19 '23 10:02 notch1p

Thanks for opening your first issue here! Be sure to follow the issue template!

welcome[bot] avatar Feb 19 '23 10:02 welcome[bot]

alist 好多子目录反代问题啊 😕

BakaJzon avatar Feb 19 '23 14:02 BakaJzon

真的有必要让前端去获取data/config.json的值么

BoYanZh avatar Feb 19 '23 15:02 BoYanZh

只是说这两个值应该是一样的。我觉得在文档里特别说明一下就行,或者干脆不要设置epubjs的默认值

notch1p avatar Feb 20 '23 01:02 notch1p

https://github.com/alist-org/docs/pull/153

BoYanZh avatar Feb 20 '23 04:02 BoYanZh