https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17050
Benjamin Rokseth <benjamin.roks...@kul.oslo.kommune.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54656|0 |1 is obsolete| | --- Comment #15 from Benjamin Rokseth <benjamin.roks...@kul.oslo.kommune.no> --- Created attachment 54662 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54662&action=edit Bug 17050: (QA followup) Use Mojo::Transaction to get the remote address While the original patch fixes the issue, reading at Mojolicious source code, revealed that Mojo::Transaction already has proper processing for detecting the remote address: sub remote_address { my $self = shift; return $self->original_remote_address(@_) if @_; return $self->original_remote_address unless $self->req->reverse_proxy; # Reverse proxy return ($self->req->headers->header('X-Forwarded-For') // '') =~ /([^,\s]+)$/ ? $1 : $self->original_remote_address; } Without this patch, if there's a request without HTTP_X_FORWARDED_FOR, then the remote address would be empty. Such would be the case of a dev/standard setup without Plack. This patch makes Koha::REST::V1::startup use tx->remote_address instead of dealing with the headers on its own. Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.roks...@kul.oslo.kommune.no> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/