diff options
-rw-r--r-- | modules/mappers/mod_rewrite.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 2066f932c1..3970cff5a9 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -5023,6 +5023,16 @@ static int hook_fixup(request_rec *r) if (l > 6 && strncmp(r->filename, "proxy:", 6) == 0) { /* it should go on as an internal proxy request */ + /* check if the proxy module is enabled, so + * we can actually use it! + */ + if (!proxy_available) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10160) + "attempt to make remote request from mod_rewrite " + "without proxy enabled: %s", r->filename); + return HTTP_FORBIDDEN; + } + /* make sure the QUERY_STRING and * PATH_INFO parts get incorporated * (r->path_info was already appended by the |