mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
Backport of the Apache 2.3 module that replaces the apparent client
remote IP address and hostname for the request with the IP address list presented by a proxy or load balancer via the request headers. WWW: http://httpd.apache.org/docs/2.3/mod/mod_remoteip.html PR: ports/146509 Submitted by: Jim Riggs <ports at christianserving.org>
This commit is contained in:
parent
b9e936ae8f
commit
34b4b07b1a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=254233
@ -532,6 +532,7 @@
|
||||
SUBDIR += mod_python
|
||||
SUBDIR += mod_python3
|
||||
SUBDIR += mod_realip
|
||||
SUBDIR += mod_remoteip
|
||||
SUBDIR += mod_roaming
|
||||
SUBDIR += mod_roaming2
|
||||
SUBDIR += mod_rpaf
|
||||
|
23
www/mod_remoteip/Makefile
Normal file
23
www/mod_remoteip/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
# New ports collection makefile for: mod_remoteip
|
||||
# Date created: 2010-05-11
|
||||
# Whom: Jim Riggs <ports@christianserving.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= mod_remoteip
|
||||
PORTVERSION= 2.3.5.a
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
||||
DISTNAME= httpd-2.3.5-alpha
|
||||
|
||||
MAINTAINER= ports@christianserving.org
|
||||
COMMENT= Replaces the client IP address/hostname with that given by a proxy
|
||||
|
||||
USE_APACHE= 2.2+
|
||||
AP_FAST_BUILD= YES
|
||||
AP_GENPLIST= YES
|
||||
|
||||
SRC_FILE= modules/metadata/${PORTNAME}.c
|
||||
|
||||
.include <bsd.port.mk>
|
3
www/mod_remoteip/distinfo
Normal file
3
www/mod_remoteip/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (httpd-2.3.5-alpha.tar.gz) = 625c9c0bf4a171cbc176a0ddcf00aea2
|
||||
SHA256 (httpd-2.3.5-alpha.tar.gz) = f1c1b322342653445db4acf049637997f9a37f478babd0277587fa58b27ae9b8
|
||||
SIZE (httpd-2.3.5-alpha.tar.gz) = 5038492
|
@ -0,0 +1,47 @@
|
||||
--- modules/metadata/mod_remoteip.c.orig 2010-05-11 21:33:43.631571954 -0500
|
||||
+++ modules/metadata/mod_remoteip.c 2010-05-11 21:34:15.374903181 -0500
|
||||
@@ -127,7 +127,7 @@
|
||||
return (*ipstr == '\0');
|
||||
}
|
||||
|
||||
-static const char *proxies_set(cmd_parms *cmd, void *internal,
|
||||
+static const char *proxies_set(cmd_parms *cmd, void *cfg,
|
||||
const char *arg)
|
||||
{
|
||||
remoteip_config_t *config = ap_get_module_config(cmd->server->module_config,
|
||||
@@ -142,7 +142,7 @@
|
||||
if (!config->proxymatch_ip)
|
||||
config->proxymatch_ip = apr_array_make(cmd->pool, 1, sizeof(*match));
|
||||
match = (remoteip_proxymatch_t *) apr_array_push(config->proxymatch_ip);
|
||||
- match->internal = internal;
|
||||
+ match->internal = cmd->info;
|
||||
|
||||
if (looks_like_ip(ip)) {
|
||||
/* Note s may be null, that's fine (explicit host) */
|
||||
@@ -168,7 +168,7 @@
|
||||
break;
|
||||
match = (remoteip_proxymatch_t *)
|
||||
apr_array_push(config->proxymatch_ip);
|
||||
- match->internal = internal;
|
||||
+ match->internal = cmd->info;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-static const char *proxylist_read(cmd_parms *cmd, void *internal,
|
||||
+static const char *proxylist_read(cmd_parms *cmd, void *cfg,
|
||||
const char *filename)
|
||||
{
|
||||
char lbuf[MAX_STRING_LEN];
|
||||
@@ -205,7 +205,7 @@
|
||||
while (*(arg = ap_getword_conf(cmd->temp_pool, &args)) != '\0') {
|
||||
if (*arg == '#' || *arg == '\0')
|
||||
break;
|
||||
- errmsg = proxies_set(cmd, internal, arg);
|
||||
+ errmsg = proxies_set(cmd, cfg, arg);
|
||||
if (errmsg) {
|
||||
errmsg = apr_psprintf(cmd->pool, "%s at line %d of %s",
|
||||
errmsg, cfp->line_number, filename);
|
5
www/mod_remoteip/pkg-descr
Normal file
5
www/mod_remoteip/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
Backport of the Apache 2.3 module that replaces the apparent client
|
||||
remote IP address and hostname for the request with the IP address
|
||||
list presented by a proxy or load balancer via the request headers.
|
||||
|
||||
WWW: http://httpd.apache.org/docs/2.3/mod/mod_remoteip.html
|
Loading…
Reference in New Issue
Block a user