Skip to content

Fix: invalid value "must-revalidate"#25

Open
seth-shi wants to merge 1 commit intoEvolutionAPI:mainfrom
seth-shi:patch-1
Open

Fix: invalid value "must-revalidate"#25
seth-shi wants to merge 1 commit intoEvolutionAPI:mainfrom
seth-shi:patch-1

Conversation

@seth-shi
Copy link

@seth-shi seth-shi commented Mar 11, 2026

Pull Request

📋 Description

Fix a critical Nginx configuration error in docker/nginx.conf. The gzip_proxied directive was using an invalid parameter must-revalidate, which caused the Nginx master process to fail during startup.

Error logs observed:
evolution-manager | 2026/03/11 03:40:07 [emerg] 7#7: invalid value "must-revalidate" in /etc/nginx/conf.d/nginx.conf:11
evolution-manager | nginx: [emerg] invalid value "must-revalidate" in /etc/nginx/conf.d/nginx.conf:11

Root Cause:
According to Nginx official documentation, must-revalidate is a valid value for the Cache-Control HTTP header, but it is not a valid parameter for the gzip_proxied directive. This PR removes the invalid parameter to allow the container to start successfully.

🔗 Related Issues

  • Fixes the container crash loop when deploying with the provided Dockerfile.

🧪 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

🧪 Testing

Test Environment

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

Test Cases

  • Manual testing completed: Confirmed the container status is Up and Nginx starts without errors.
  • Verified that Gzip compression still functions with the remaining valid parameters.

Test Instructions

  1. Build the image: docker build -t evolution-manager:test .
  2. Run the container: docker run --rm evolution-manager:test
  3. Check the output: Nginx should start normally instead of exiting with code 1.

✅ Checklist

Code Quality

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors

Testing

  • I have tested the changes and proved my fix is effective.

📝 Additional Notes

The valid parameters for gzip_proxied are: off, expired, no-cache, no-store, private, no_last_modified, no_etag, auth, or any.


Thank you for contributing to Evolution Manager! 🚀

Summary by Sourcery

Bug Fixes:

  • Remove the unsupported must-revalidate value from the gzip_proxied directive in the Docker Nginx configuration to allow Nginx to start successfully.

fix: evolution-manager  | nginx: [emerg] invalid value "must-revalidate" in /etc/nginx/conf.d/nginx.conf:11
Copilot AI review requested due to automatic review settings March 11, 2026 03:53
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 11, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes an invalid must-revalidate parameter from the Nginx gzip_proxied directive in the Docker Nginx configuration so Nginx can start successfully while preserving gzip behavior.

Flow diagram for Nginx startup before and after gzip_proxied fix

flowchart LR
    A[Container_start] --> B[Nginx_master_process_start]
    B --> C[Load_nginx_conf_from_docker_nginx_conf]
    C --> D[Parse_gzip_proxied_directive]

    D -->|Before_fix_with_must_revalidate| E[Config_error_invalid_value_must_revalidate]
    E --> F[Nginx_exits_with_code_1]
    F --> G[Container_crash_loop]

    D -->|After_fix_without_must_revalidate| H[Config_parsed_successfully]
    H --> I[Enable_gzip_with_valid_parameters]
    I --> J[Nginx_listens_on_configured_ports]
    J --> K[Container_status_Up]
Loading

File-Level Changes

Change Details Files
Correct Nginx gzip_proxied configuration to remove invalid parameter that prevented Nginx from starting.
  • Removed the unsupported must-revalidate token from the gzip_proxied directive while keeping all other valid parameters intact.
  • Left the rest of the gzip-related directives (gzip, gzip_vary, gzip_min_length, gzip_types) unchanged to preserve existing compression behavior.
  • Retained the health-check endpoint and other server configuration as-is, with no functional modifications.
.docker/nginx.conf

Possibly linked issues

  • #[Bug]: Invalid parameter must-revalidate in gzip_proxied directive (nginx.conf line 11): They are the same bug: PR removes must-revalidate from gzip_proxied, resolving the Nginx startup error described in issue.

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 left some high level feedback:

  • Consider adding a brief comment in nginx.conf near the gzip_proxied directive explaining why must-revalidate is omitted and listing the valid options, to prevent future re-introduction of invalid values.
  • Update .docker/nginx.conf to end with a newline character to avoid potential issues with tools or linters that expect POSIX-style text files.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider adding a brief comment in `nginx.conf` near the `gzip_proxied` directive explaining why `must-revalidate` is omitted and listing the valid options, to prevent future re-introduction of invalid values.
- Update `.docker/nginx.conf` to end with a newline character to avoid potential issues with tools or linters that expect POSIX-style text files.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an Nginx startup failure caused by an invalid gzip_proxied parameter in the Docker Nginx configuration, ensuring the container can start successfully.

Changes:

  • Removes the invalid must-revalidate token from gzip_proxied.
  • Minor formatting/line normalization at the end of the Nginx config file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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.

2 participants