Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FEATURE]OpenResty自动添加缓存配置问题 #4069

Open
zzreador opened this issue Mar 5, 2024 · 2 comments
Open

[FEATURE]OpenResty自动添加缓存配置问题 #4069

zzreador opened this issue Mar 5, 2024 · 2 comments
Assignees

Comments

@zzreador
Copy link

zzreador commented Mar 5, 2024

1Panel 版本

v1.10.0-lts

请描述您的需求或者改进建议

OpenResty版本: 1.21.4.3-0-focal
网站中任意多添加一个反向代理时,OpenResty的配置中会自动添加 缓存相关配置。这会导致大文件的分片下载失败,就是http header中的 Range参数会被过滤掉。
59b47f38702800dcb7ede4ea53893296978683c0_2_690x208
3a1206f492f6d6241a112315b4b503db84ab6718

请描述你建议的实现方案

网站反向代理有打开缓存的状态下,才添加缓存相关配置配置。如果全部网站都关闭缓存的状态,把缓存相关配置配置删除。

附加信息

No response

@zhengkunwang223
Copy link
Member

为了方便 1Panel 使用了全局的缓存配置
后续版本优化此处

@arch3rPro
Copy link

因为反代缓存问题,经常出现串站现象,每次都得清理反代缓存(PS:已经设置了不开启缓存)。找到一个临时的解决办法,使用chattr 命令将 缓存文件夹设置只读。chattr +i /opt/1panel/apps/openresty/OpenResty/www/common/proxy/proxy_temp_dir,这样就不会再有反代缓存了,不过清除按钮会报错,暂时不影响使用。不想设置的时候,再用chattr -i 改回来就行

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants