mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
nginx: Warn about not workable 'proxy'
Proxy is not yet ready for nginx. Instead of give a generic error, this patch adds a clean message explains that such functionality is not available on the nginx port. This patch also modifies the test cases to reflect this changes.
This commit is contained in:
@@ -195,6 +195,7 @@ int perform_interception(modsec_rec *msr) {
|
||||
break;
|
||||
|
||||
case ACTION_PROXY :
|
||||
#if !(defined(VERSION_IIS)) && !(defined(VERSION_NGINX)) && !(defined(VERSION_STANDALONE))
|
||||
if (msr->phase < 3) {
|
||||
if (ap_find_linked_module("mod_proxy.c") == NULL) {
|
||||
log_level = 1;
|
||||
@@ -219,6 +220,15 @@ int perform_interception(modsec_rec *msr) {
|
||||
"(Configuration Error: Proxy action requested but it does not work in output phases).",
|
||||
phase_text);
|
||||
}
|
||||
#else
|
||||
log_level = 1;
|
||||
status = HTTP_INTERNAL_SERVER_ERROR;
|
||||
message = apr_psprintf(msr->mp, "Access denied with code 500%s "
|
||||
"(Configuration Error: Proxy action to %s requested but "
|
||||
"proxy is only available in Apache version).",
|
||||
phase_text,
|
||||
log_escape_nq(msr->mp, actionset->intercept_uri));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ACTION_DROP :
|
||||
|
Reference in New Issue
Block a user