trungtien commented on issue #10845:
URL: https://github.com/apache/apisix/issues/10845#issuecomment-2160083063

   curl --location --request PUT 'http://x.x.x.x:9180/apisix/admin/routes/' \
   --header 'X-API-KEY: yyyyyyyyyyyyyyyyyyyy' \
   --header 'Content-Type: application/json' \
   --data-raw '{
     "id": "getting-started-waf",
     "uri": "/anything/*",
      "plugins": {
       "coraza-filter": {
         "conf": "{\n                \"directives_map\": {\n                    
\"default\": [\n                        \"SecDebugLogLevel 9\",\n               
         \"SecRuleEngine On\",\n                        \"Include 
@crs-setup-conf\",\n                        \"Include @owasp_crs/*.conf\"\n     
               ]\n                },\n                \"default_directives\": 
\"default\"\n            }"
       }
     },
     "upstream": {
       "type": "roundrobin",
       "nodes": {
         "a.b.c.d:80": 1
       }
     }
   }'
   
   It's working now by converting the 'conf' variable from JSON to a string.
   apisix version LTS: 3.2.2
   Coraza wasm 0.4.0
   
   error log:
   Coraza: Access denied (phase 1). Inbound Anomaly Score Exceeded in phase 1 
(Total Score: 16) [file "@owasp_crs/REQUEST-949-BLOCKING-EVALUATION.conf"] 
[line "11098"] [id "949111"]
   
   @githubxubin  You need to export the schema.json file and then copy it to 
the APISIX dashboard to register Coraza.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to