[Koha-bugs] [Bug 17050] Accessing the REST API through Plack kicks the session out

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 17 00:44:49 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17050

--- Comment #10 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Jonathan, I inserted my infamous Plack::Middleware::Tomas that just prints env,
and interestingly:

 {
    HTTP_ACCEPT                     
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    HTTP_ACCEPT_ENCODING             "gzip, deflate",
    HTTP_ACCEPT_LANGUAGE             "en-US,en;q=0.5",
    HTTP_COOKIE                      "KohaOpacLanguage=en;
CGISESSID=59977e155eba3200f39ba4b1cb23efec",
    HTTP_DNT                         1,
    HTTP_HOST                        "localhost:8081",
    HTTP_REFERER                    
"http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51",
    HTTP_UPGRADE_INSECURE_REQUESTS   1,
    HTTP_USER_AGENT                  "Mozilla/5.0 (Macintosh; Intel Mac OS X
10.11; rv:49.0) Gecko/20100101 Firefox/49.0",
    HTTP_X_FORWARDED_FOR             "10.0.2.2",
    HTTP_X_FORWARDED_HOST            "localhost:8081",
    HTTP_X_FORWARDED_SERVER          "kohadev-intra.myDNSname.org",
    PATH_INFO                        "/intranet/mainpage.pl",
    psgi.errors                      *main::STDERR  (write-only, flags: append,
layers: unix perlio),
    psgi.input                       *Starman::Server::$io  (layers: scalar),
    psgi.multiprocess                1,
    psgi.multithread                 "",
    psgi.nonblocking                 "",
    psgi.run_once                    "",
    psgi.streaming                   1,
    psgi.url_scheme                  "http",
    psgi.version                     [
        [0] 1,
        [1] 1
    ],
    psgix.harakiri                   1,
    psgix.input.buffered             1,
    psgix.io                         *Symbol::GEN41  (read/write, layers: unix
perlio),
    QUERY_STRING                     "",
    REMOTE_ADDR                      "10.0.2.2",
    REMOTE_HOST                      undef,
    REMOTE_PORT                      0,
    REQUEST_METHOD                   "GET",
    REQUEST_URI                      "/intranet/mainpage.pl",
    SCRIPT_NAME                      "",
    SERVER_NAME                      0,
    SERVER_PORT                      8081,
    SERVER_PROTOCOL                  "HTTP/1.1"
}

so HTTP_X_FORWARDED_FOR and REMOTE_ADDR have the right values. Are you implying
that Mojo is messing with ENV?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list