Skip to content
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

Add config validate flag #192

Merged
merged 2 commits into from
Mar 25, 2025
Merged

Conversation

hedgieinsocks
Copy link

This PR adds what was attempted in #110
But the reasoning is different.
Now, the app does not pick up an invalid config on reload, which is awesome.
Still, the admin might need a way to validate another testing or staging config without messing around with the current one. This could be useful for testing or used by external config builders.

Copy link
Contributor

@fionera fionera left a comment

Choose a reason for hiding this comment

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

Maybe return instead of exit here to allow all "defers" to execute

@hedgieinsocks
Copy link
Author

❯ go run . --validate --config ./example/coraza-spoa.yaml
4:00PM INF Configuration file is valid

@fionera fionera merged commit 7f0b8c0 into corazawaf:main Mar 25, 2025
3 checks passed
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