Skip to content

Conversation

@HynoR
Copy link
Contributor

@HynoR HynoR commented Dec 9, 2025

What this PR does / why we need it?

#11273
默认由反向代理的上游负责cache-control 头, openrestry不再添加反向代理的所有缓存策略,浏览器缓存衍生出三个按钮用于支持新逻辑。

状态 前端按钮 cacheTime 后端保存函数 后端解析结果 Nginx 配置
启用缓存 enable > 0 AddBrowserCache 解析 expires → 正数 if ($uri ~* ...) { expires 4h; }
不修改 noModify = 0 RemoveBrowserCache 无配置 → 默认值 0 无相关配置
禁用缓存 disable = -1 AddBroswerNoCache 解析 Cache-Control no-cache → -1 if ($uri ~* ...) { add_header Cache-Control no-cache; }

Summary of your change

  • Updated browser cache handling in WebsiteService to include a 'noModify' option.
  • Introduced new method AddBroswerNoCache in Location to manage no-cache directives.
  • Added localization for 'noModify' in multiple languages.
  • Updated frontend to support the new browser cache options in the proxy configuration.
image

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

- Updated browser cache handling in WebsiteService to include a 'noModify' option.
- Introduced new method AddBroswerNoCache in Location to manage no-cache directives.
- Added localization for 'noModify' in multiple languages.
- Updated frontend to support the new browser cache options in the proxy configuration.
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Dec 9, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Dec 9, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ssongliu for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

- Adjusted the rendering of cache tags in the proxy configuration to conditionally display based on cache time values.
- Improved user interface by adding margin classes for better spacing between cache tags.
@HynoR HynoR marked this pull request as ready for review December 9, 2025 08:59
@zhengkunwang223 zhengkunwang223 merged commit b47a452 into 1Panel-dev:dev-v2 Dec 9, 2025
0 of 3 checks passed
@HynoR HynoR deleted the pr@ccfix branch December 10, 2025 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants