Dear David,
this is in essence a good addition - i though about this as well in the
past.
One alterative to the option would be a global configuration parameter
(maybe generalizing "checkforproy" for nslog), such that a webmaster
can say "i am running behind a proxy, i don't care about the physical
upstream peer". However, it might as well be that in some cases
the true peer address is needed, and sometimes the proxied one ...
which is possible with your modifications.
I have made one essential change by moving "-checkforproxy" to the last
position
using "ns_server active -checkforproxy". If it is used before the
sub-command,
"-checkforproxy" is applicable to all "ns_server" sub-commands (like e.g.
"ns_server pagedir"), where the option does nothing but confusing a user.
It was as well showing up in the error messages for invalid commands.
By moving it to the end, it can be made specific to the three sub-commands
where it makes sense ("active", "queued", and "all").
all the best
-gn
Am 29.09.17 um 5:50 PM schrieb David Osborne:
Hi,
We have a need for ns_server active & queued commands to be
proxy-aware in the IP addresses that they report.
Similar to how the access log IP address can be configured to report
the X-Forwarded-For value (if it exists)
<https://bitbucket.org/naviserver/naviserver/src/5436d27a76802882b66d2e701a781a40693028db/nslog/nslog.c?at=default&fileviewer=file-view-default#nslog.c-588>,
could we provide a command switch for ns_server which would do the same?
I've created a pull request to show what I mean.
https://bitbucket.org/naviserver/naviserver/pull-requests/16/checkforproxy-switch-for-ns_server/diff
<https://bitbucket.org/naviserver/naviserver/pull-requests/16/checkforproxy-switch-for-ns_server/diff>
Does this seem sensible?
Regards,
--
David
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel