Skip to content

Conversation

@fzipi
Copy link
Member

@fzipi fzipi commented Jan 8, 2026

what

  • update to match the latest libcoraza api

why

  • test if it builds and works

Signed-off-by: Felipe Zipitria <[email protected]>
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

This pull request updates the nginx-coraza connector to use the latest libcoraza API. The changes introduce a two-phase WAF initialization pattern where configuration objects are created first, rules are loaded into the config, and then WAF instances are created from the configuration.

Key changes:

  • Split WAF creation into config creation and WAF instantiation phases
  • Updated intervention processing to use new libcoraza API (removed URL redirect handling)
  • Changed from coraza_rules_add for files to coraza_rules_add_file API
  • Updated Dockerfile to manually install library files and switch from libpcre3 to libpcre2

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/ngx_http_coraza_common.h Added coraza_waf_config_t typedef and updated structs to include both config and waf fields; changed function signature to pass transaction by value instead of pointer
src/ngx_http_coraza_module.c Refactored intervention processing to use new API, implemented two-phase WAF initialization, updated cleanup functions, and modified merge logic to share WAF instances between parent/child configs
Dockerfile Changed from make install to manual file copying and updated PCRE dependency from libpcre3 to libpcre2

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

@fzipi
Copy link
Member Author

fzipi commented Jan 8, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link

Copilot AI commented Jan 8, 2026

@fzipi I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants