Skip to content

fix: temporarily disable precompressed directive#41365

Merged
wyattwalter merged 1 commit intoreleasefrom
ww-caddy-disble-precompressed-directive
Dec 3, 2025
Merged

fix: temporarily disable precompressed directive#41365
wyattwalter merged 1 commit intoreleasefrom
ww-caddy-disble-precompressed-directive

Conversation

@wyattwalter
Copy link
Contributor

@wyattwalter wyattwalter commented Nov 5, 2025

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Disable precompressed directive in Caddy temporarily. This is to cause Caddy to serve static files with a 200 instead of a 206 due to a change in behavior in Caddy 2.10.2.

The 206 response is causing rate limit issues in some installs, and failed upgrades in others when folks use an HTTP request to / for health checks. It also causes browsers to not validate files correctly, so we make a lot of extra requests to the server.

There's 2 options to address it:

  • Downgrade Caddy, which introduces a few 3 month old high CVEs via the Golang toolchain
  • Disable precompressed directive and let Caddy compress the files on the fly during requests

There's a fix in the default branch of Caddy for this issue, we're just waiting for a release.

Fixes #41313

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Bug Fixes
    • Temporarily disabled precompressed file delivery to resolve compatibility issues. This feature will be automatically re-enabled when Caddy updates to version 2.10.3 or later.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added Bug Something isn't working Medium Issues that frustrate users due to poor UX Production labels Nov 5, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 5, 2025

Walkthrough

Comments out the precompressed directive in the Caddy file server configuration as a temporary workaround for a Caddy 2.10.2 bug that causes pre-compressed static assets to return 206 status codes, preventing browser caching and triggering rate limiting issues.

Changes

Cohort / File(s) Change Summary
Caddy Configuration Workaround
deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs
Disables precompressed directive and adds explanatory comments indicating the feature is temporarily disabled pending Caddy 2.10.3+ release. No functional logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single-file change with straightforward comment addition and directive deactivation
  • No logic modifications or control flow impact

Poem

🚫 Precompressed, now at rest,
A Caddy bug put to the test,
Till 2.10.3 comes to stay,
We'll serve them fresh the old-school way! 📦

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: disabling the precompressed directive in Caddy as a temporary fix.
Description check ✅ Passed The description includes context, motivation, trade-off analysis, and links to the related issue, following the template structure.
Linked Issues check ✅ Passed The PR addresses issue #41313 by disabling the precompressed directive to prevent 206 responses, preventing rate-limit issues and caching problems.
Out of Scope Changes check ✅ Passed All changes are scoped to disabling precompressed support; no unrelated modifications present in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ww-caddy-disble-precompressed-directive

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 780c3c8 and 597aee7.

📒 Files selected for processing (1)
  • deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: Aishwarya-U-R
Repo: appsmithorg/appsmith PR: 29405
File: app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js:37-41
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The pull request titled "test: Cypress | Replace static with Dynamic waits - Part 1" is part of a phased approach where only certain test specifications are targeted for static wait removal in the initial phase. Future phases will address additional specs.
Learnt from: Aishwarya-U-R
Repo: appsmithorg/appsmith PR: 29405
File: app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js:37-41
Timestamp: 2024-10-08T15:32:39.374Z
Learning: The pull request titled "test: Cypress | Replace static with Dynamic waits - Part 1" is part of a phased approach where only certain test specifications are targeted for static wait removal in the initial phase. Future phases will address additional specs.
📚 Learning: 2024-11-25T10:19:42.548Z
Learnt from: sharat87
Repo: appsmithorg/appsmith PR: 37672
File: deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs:251-258
Timestamp: 2024-11-25T10:19:42.548Z
Learning: In the JavaScript file `deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs`, explicit error handling for file operations within the `finalizeHtmlFiles` function is not necessary because failures will show up as exceptions anyway.

Applied to files:

  • deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs
📚 Learning: 2024-07-26T21:12:57.228Z
Learnt from: sharat87
Repo: appsmithorg/appsmith PR: 28081
File: deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs:124-127
Timestamp: 2024-07-26T21:12:57.228Z
Learning: User sharat87 prefers not to add error handling for the Caddy configuration commands in the `caddy-reconfigure.mjs` script, considering that the failure of the commands will be evident and that the formatting command's failure is not critical.

Applied to files:

  • deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs
🔇 Additional comments (1)
deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs (1)

58-60: Good workaround with clear documentation.

The change directly addresses the Caddy 2.10.2 bug by disabling precompressed file serving, which will force Caddy to return HTTP 200 instead of 206 responses. This restores proper browser caching behavior and prevents rate limiting issues. The comments clearly document the temporary nature and when re-enabling is safe.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Nov 13, 2025
@github-actions
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Nov 20, 2025
@wyattwalter wyattwalter reopened this Dec 3, 2025
@wyattwalter
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/19894115995.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41365.
recreate: .

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Deploy-Preview-URL: https://ce-41365.dp.appsmith.com

@wyattwalter wyattwalter marked this pull request as ready for review December 3, 2025 12:52
@wyattwalter wyattwalter merged commit 1ff537a into release Dec 3, 2025
29 checks passed
@wyattwalter wyattwalter deleted the ww-caddy-disble-precompressed-directive branch December 3, 2025 13:26
tomjose92 pushed a commit that referenced this pull request Dec 4, 2025
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._

Disable precompressed directive in Caddy temporarily. This is to cause
Caddy to serve static files with a 200 instead of a 206 due to a change
in behavior in Caddy 2.10.2.

The 206 response is causing rate limit issues in some installs, and
failed upgrades in others when folks use an HTTP request to `/` for
health checks. It also causes browsers to not validate files correctly,
so we make a lot of extra requests to the server.

There's 2 options to address it:

- Downgrade Caddy, which introduces a few 3 month old high CVEs via the
Golang toolchain
- Disable precompressed directive and let Caddy compress the files on
the fly during requests

There's a fix in the default branch of Caddy for this issue, we're just
waiting for a release.

Fixes [#41313](#41313)

> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Temporarily disabled precompressed file delivery to resolve
compatibility issues. This feature will be automatically re-enabled when
Caddy updates to version 2.10.3 or later.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Medium Issues that frustrate users due to poor UX Production Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Requests being rate limited by default

2 participants