Skip to content

fix(docker): remove invalid must-revalidate parameter from gzip_proxied#24

Open
Oraculo-sh wants to merge 1 commit intoEvolutionAPI:mainfrom
Oraculo-sh:fix/nginx-syntax-error
Open

fix(docker): remove invalid must-revalidate parameter from gzip_proxied#24
Oraculo-sh wants to merge 1 commit intoEvolutionAPI:mainfrom
Oraculo-sh:fix/nginx-syntax-error

Conversation

@Oraculo-sh
Copy link

@Oraculo-sh Oraculo-sh commented Mar 10, 2026

Pull Request

📋 Description

This PR fixes a critical crash loop in the Nginx container during the boot process. The error was caused by the presence of the must-revalidate parameter within the gzip_proxied directive in the .docker/nginx.conf file.

While must-revalidate is a valid string for Cache-Control headers, it is not a valid parameter for gzip_proxied. Recent versions of the Nginx engine (specifically mainline 1.26+) have moved from issuing warnings to fatal errors when encountering invalid parameters in this directive, leading to an immediate container crash ([emerg]).

🔗 Related Issues

  • Fixes #
  • Related to #

🧪 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI changes
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvements
  • 🔧 Build/CI changes
  • 🧪 Tests

🧪 Testing

Test Environment

  • Local development
  • Staging environment
  • Production-like environment (Docker Compose on Linux)

Test Cases

  • Unit tests pass
  • Integration tests pass
  • Manual testing completed: Confirmed Nginx (v1.29.2) starts successfully and the UI is accessible via browser.
  • Cross-browser testing (if applicable)
  • Mobile testing (if applicable)

Test Instructions

  1. Deploy the environment using docker compose up.
  2. Observe the evolution_frontend container log; it will fail with nginx: [emerg] invalid value "must-revalidate" in /etc/nginx/conf.d/nginx.conf:11.
  3. Apply this fix by removing must-revalidate from the gzip_proxied line in .docker/nginx.conf.
  4. Rebuild/Restart the container and verify that the status is Up and worker processes have started.

✅ Checklist

Code Quality

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have run npm run lint and fixed any issues

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested the changes in multiple browsers (if applicable)
  • I have tested the changes on mobile devices (if applicable)

Thank you for contributing to Evolution Manager! 🚀

Summary by Sourcery

Bug Fixes:

  • Remove the invalid must-revalidate option from the gzip_proxied directive in the Nginx Docker configuration to restore successful container startup.

The Nginx container was trapped in a crash loop during boot because 'must-revalidate' is an invalid parameter for the 'gzip_proxied' directive in .docker/nginx.conf. Removed the parameter to restore stability.
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 10, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes an invalid must-revalidate token from the Nginx gzip_proxied directive in the Docker Nginx configuration to prevent startup failures with newer Nginx versions.

Sequence diagram for container startup before and after gzip_proxied fix

sequenceDiagram
    participant Dev as developer
    participant DC as docker_compose
    participant C as evolution_frontend_container
    participant N as nginx
    participant Conf as nginx_conf

    Dev->>DC: run docker compose up
    DC->>C: create and start container
    C->>N: start nginx master process
    N->>Conf: load /etc/nginx/conf.d/nginx.conf
    alt config_before_fix
        Conf-->>N: directive gzip_proxied ... must_revalidate auth
        N-->>C: [emerg] invalid value must-revalidate
        C-->>DC: exit with status 1
    else config_after_fix
        Conf-->>N: directive gzip_proxied ... auth
        N-->>C: configuration ok
        C-->>DC: container status Up
    end
Loading

File-Level Changes

Change Details Files
Fix Nginx startup failure by correcting the gzip_proxied directive configuration.
  • Remove the unsupported must-revalidate parameter from the gzip_proxied directive to align with valid Nginx options.
  • Retain other existing gzip_proxied parameters (expired, no-cache, no-store, private, auth) to preserve intended caching and compression behavior.
.docker/nginx.conf

Possibly linked issues

  • #[Bug]: Invalid parameter must-revalidate in gzip_proxied directive (nginx.conf line 11): PR removes the invalid must-revalidate option from gzip_proxied in nginx.conf, directly fixing the reported startup bug.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant