OpenList icon indicating copy to clipboard operation
OpenList copied to clipboard

[BUG] Token is invalidated

Open xiaoxiaozhoutop opened this issue 1 year ago • 11 comments

Please confirm the following

  • [x] I have read and agree to AGPL-3.0 Section 15 . The program is provided "as is" without any warranties; you bear all risks of using it.

  • [x] I have read and agree to AGPL-3.0 Section 16 . The copyright holders and distributors are not liable for any damages resulting from the use or inability to use the program.

  • [x] I confirm my description is clear, polite, helps developers quickly locate the issue, and complies with community rules.

  • [x] I have read the OpenList documentation.

  • [x] I confirm there are no duplicate issues or discussions.

  • [x] I confirm this is an OpenList issue, not caused by other reasons (such as network, dependencies, or operation).

  • [x] I believe this issue must be handled by OpenList and not by a third party.

  • [x] I confirm this issue is not fixed in the latest version.

OpenList Version (required)

4.0.7

Storage Driver Used (required)

本地存储

Bug Description (required)

我部署在云服务器上,使用ip+端口可以正常登录,但使用域名+cdn就无法访问,直接访问登录页登录成功后报错Token is invalidated,直接访问首页控制台报错:Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

Configuration File Content (required)

networks: 1panel-network: external: true services: openlist: container_name: ${CONTAINER_NAME} deploy: resources: limits: cpus: ${CPUS} memory: ${MEMORY_LIMIT} environment: - TZ=${TIME_ZONE} - PUID=0 - PGID=0 - UMASK=022 image: ${OPENLIST_IMAGE} labels: createdBy: Apps networks: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:5244 restart: always volumes: - ./data:/opt/openlist/data - /data:/data/data

Logs (optional)

No response

Reproduction Link (optional)

No response

xiaoxiaozhoutop avatar Jul 11 '25 03:07 xiaoxiaozhoutop

感谢您联系OpenList。我们会尽快回复您。 Thanks for contacting OpenList. We will reply to you as soon as possible.

github-actions[bot] avatar Jul 11 '25 03:07 github-actions[bot]

如果你配置了CDN,你需要配置CDN转发参数+不缓存页面XHR

PIKACHUIM avatar Jul 11 '25 03:07 PIKACHUIM

如果你配置了CDN,你需要配置CDN转发参数+不缓存页面XHR

希望将说明写入OpenList 文档,

xiaoxiaozhoutop avatar Jul 11 '25 04:07 xiaoxiaozhoutop

如果你配置了CDN,你需要配置CDN转发参数+不缓存页面XHR

需要配置哪些参数?

xiaoxiaozhoutop avatar Jul 11 '25 05:07 xiaoxiaozhoutop

每个CDN运营商都不同,我们不可能一家家做教程,更不知道你需要配置哪些参数。 按Cloudflare来说,动态请求都是默认不缓存的,Authorization头也是正常转发的。 另外,这个问题也有可能是你内外域名配置不对,如果是反向代理不对请参考这里

jyxjjj avatar Jul 11 '25 09:07 jyxjjj

每个CDN运营商都不同,我们不可能一家家做教程,更不知道你需要配置哪些参数。 按Cloudflare来说,动态请求都是默认不缓存的,Authorization头也是正常转发的。 另外,这个问题也有可能是你内外域名配置不对,如果是反向代理不对请参考这里

能不能添加一个1panel的,还是有部分人群是使用1panel的

xiaoxiaozhoutop avatar Jul 11 '25 09:07 xiaoxiaozhoutop

我们应该不会给cdn做适配,正常情况来说,cdn回源带上全部参数且不缓存XHR请求本身就行了 具体的设置方法,可以找cdn提供商文档或者cdn的客服看下

PIKACHUIM avatar Jul 11 '25 09:07 PIKACHUIM

我们应该不会给cdn做适配,正常情况来说,cdn回源带上全部参数且不缓存XHR请求本身就行了 具体的设置方法,可以找cdn提供商文档或者cdn的客服看下

我这边是设置的带全部参数且不缓存XHR还是一样的情况

xiaoxiaozhoutop avatar Jul 11 '25 17:07 xiaoxiaozhoutop

弱弱的问一下XHR是什么意思?

Ran-Xing avatar Aug 21 '25 12:08 Ran-Xing

弱弱的问一下XHR是什么意思?

其实只要不缓存api就行没有那么多设置,本人亲测

xiaoxiaozhoutop avatar Aug 21 '25 12:08 xiaoxiaozhoutop

@zhouw1015 感谢大哥,其实我是云函数运行的,可能坑更多,谢谢大佬

Ran-Xing avatar Aug 21 '25 13:08 Ran-Xing