mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
git-daemon: set REMOTE_ADDR to client address
This allows hooks like pre-receive to look at the client's IP address. Of course the IP address can't be used to get strong security; git-daemon isn't the right thing to use if you need that. However, basic IP address checking can be good enough in some situations. REMOTE_ADDR is the same environment variable used to communicate the client's address to CGI scripts. Signed-off-by: Joey Hess <joey@kitenet.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
759ad19e77
commit
53ffb878a9
@ -270,6 +270,15 @@ selectively enable/disable services per repository::
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
ENVIRONMENT
|
||||
-----------
|
||||
'git-daemon' will set REMOTE_ADDR to the IP address of the client
|
||||
that connected to it, if the IP address is available. REMOTE_ADDR will
|
||||
be available in the environment of hooks called when
|
||||
services are performed.
|
||||
|
||||
|
||||
|
||||
Author
|
||||
------
|
||||
Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki
|
||||
|
Loading…
Reference in New Issue
Block a user