-
Notifications
You must be signed in to change notification settings - Fork 20
Set default value for "state_path". #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces default state path functionality for ACME issuers and adds support for disabling state persistence with the "off" value. The change addresses issue #32 by automatically generating state paths based on the issuer name when not explicitly configured.
- Adds automatic generation of default state paths using "acme_{issuer.name}" pattern
- Introduces "off" special value to disable state persistence (stateless behavior)
- Adds build-time configuration option NGX_ACME_STATE_PREFIX for custom state path prefixes
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/conf/issuer.rs | Implements default state path generation logic and NGX_CONF_UNSET_PTR usage |
| src/conf.rs | Adds custom command handler for state_path to support "off" value |
| README.md | Documents new build option and updated state_path syntax |
| t/acme_conf_issuer.t | Updates test configurations to include explicit state_path settings |
| t/acme_conf_certificate.t | Updates test configuration to include explicit state_path setting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
xeioex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good.
Set default state_path to "acme_{issuer.name}" and introduce a special
value "off" to revert to a stateless behavior.
As usual, relative paths in configuration are resolved against
NGX_PREFIX. The NGX_ACME_STATE_PREFIX environment variable can be set
during build to override this behavior. The way we take the option may
look a bit unusual, but unfortunately there's no infra for adding
module-specific options in auto/configure.
Fixes nginx#32.
ensh63
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for me.
Set default state_path to "acme_{issuer.name}" and introduce a special value "off" to revert to a stateless behavior.
As usual, relative paths in configuration are resolved against NGX_PREFIX. The NGX_ACME_STATE_PREFIX environment variable can be set during build to override this behavior. The way we take the option may look a bit unusual, but unfortunately there's no infra for adding module-specific options in auto/configure.
Fixes #32.