comparison Core/HttpServer/MongooseServer.cpp @ 1959:45c4387a379c

Access to the HTTP headers in the "IncomingHttpRequestFilter()" callback
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Apr 2016 16:26:22 +0200
parents b1291df2f780
children af0c90ae0915
comparison
equal deleted inserted replaced
1958:c746e2d42ac8 1959:45c4387a379c
643 std::string username = GetAuthenticatedUsername(headers); 643 std::string username = GetAuthenticatedUsername(headers);
644 644
645 const IIncomingHttpRequestFilter *filter = that->GetIncomingHttpRequestFilter(); 645 const IIncomingHttpRequestFilter *filter = that->GetIncomingHttpRequestFilter();
646 if (filter != NULL) 646 if (filter != NULL)
647 { 647 {
648 if (!filter->IsAllowed(method, request->uri, remoteIp, username.c_str())) 648 if (!filter->IsAllowed(method, request->uri, remoteIp, username.c_str(), headers))
649 { 649 {
650 output.SendUnauthorized(ORTHANC_REALM); 650 output.SendUnauthorized(ORTHANC_REALM);
651 return; 651 return;
652 } 652 }
653 } 653 }