[Bug]: F-28 Behind Caddy (and nginx without the documented rules) every page load downloads 11 MB of JavaScript and CSS
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- nginx
調査の方向性
issue で言及されている Caddy 設定スニペット docs/nextcloud-perf.caddy から始め、そのファイルマッチャーがディスク上のアセットと PHP ルートをどのように区別するかを確認してください。バージョン付きアセットと 2 種類のルート例について、文書化されたキャッシュと圧縮の動作を検証してください。完了の基準は、ガイダンスが PHP 生成レスポンスに長期間有効なキャッシュヘッダーを適用しないようにし、パフォーマンス規則を文書化していることです。
索引モデルが issue の本文から書いたものです。
説明
⚠️ This issue respects the following points: ⚠️
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
- This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
- I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
- I agree to follow Nextcloud's Code of Conduct.
- I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
F-28 · Behind Caddy (and nginx without the documented rules) every page load downloads 11 MB of JavaScript and CSS
| Severity | Performance (deployment; the slowest part of the web UI on remote connections) |
| Component | web server configuration, .htaccess equivalents |
| Affects | installations not served by Apache, e.g. nextcloud:fpm with Caddy |
| Verified | Measured with a browser against Caddy with and without the rules |
Measurement (Files app, 50 Mbit/s, 20 ms latency)
| without | with compression and caching | |
|---|---|---|
| Transferred on the first visit | 11.0 MB | 2.7 MB |
| Time until the file list shows | 3.7 s | 2.2 s |
core-common.js |
5.7 MB | 1.2 MB (zstd) |
Without Cache-Control, browsers revalidate or download the 65 scripts and 45 stylesheets again.
Apache gets these rules from .htaccess (max-age=15778463, immutable for versioned assets);
Caddy and nginx need them in their own configuration. With encode zstd gzip the bundles shrink to
a quarter.
The rules must only match files that exist on disk (Caddy file matcher), as FilesMatch does in
Apache. A plain path *.css matcher also hits PHP routes such as /apps/theming/theme/default.css
and /apps/theming/img/core/filetypes/*.svg. Caddy then sends a second Cache-Control header
next to the one from PHP (private, max-age=86400, must-revalidate), and browsers cache the theme
CSS for half a year. The snippet in docs/nextcloud-perf.caddy uses the file matcher and was
checked against both kinds of URL.
Steps to reproduce
see the top
Expected behavior
see the top
Nextcloud Server version
35
Operating system
No response
PHP engine version
No response
Web server
No response
Database engine version
No response
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
- 主要言語
- JavaScript
- スター
- 632
- フォーク
- 2.5k
- 平均マージ
- 1日 51分
- マージ済み PR(30日)
- 77
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/documentation のほかの issue
-
0. needs triage enhancement manual: developer security
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nextcloud/documentation#15693 ·
メンテナーはふだん 1 日以内に返信
-
0. needs triage bug developer experience manual: developer
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nextcloud/documentation#15690 ·
メンテナーはふだん 1 日以内に返信
-
Developer manual: mention the org's appstore-build-publish workflow対応中かも @whoalin1 が 1 日前に担当しました。 オープン0. needs triage developer experience enhancement good first issue manual: developer
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nextcloud/documentation#15687 ·
メンテナーはふだん 1 日以内に返信
-
Developer manual: recommend a SECURITY.md in publishing.rst対応中かも @whoalin1 が 1 日前に担当しました。 オープン0. needs triage enhancement good first issue manual: developer security
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
nextcloud/documentation#15686 ·
メンテナーはふだん 1 日以内に返信
-
Developer manual: what to clean up on uninstall in repair.rst対応中かも @whoalin1 が 1 日前に担当しました。 オープン0. needs triage enhancement good first issue manual: developer
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
nextcloud/documentation#15685 ·
メンテナーはふだん 1 日以内に返信
nextcloud/documentation の issue をすべて見る
似ている issue
-
Bump Firebase JS SDK (12.19.0 → 13.0.0)対応中かも @SelaseKay が今日担当しました。 オープンNeeds Attention type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
invertase/react-native-firebase#9364 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
tchiotludo/akhq#3307 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
DietrichGebert/ponytail#1063 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zen-browser/desktop#15809 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 90/100