diff Core/HttpServer/MongooseServer.cpp @ 2790:c7313e1f7644

MongooseServer::SetRealm()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 26 Jul 2018 20:43:03 +0200
parents 33c0b4da8cb2
children 7133ad478eea
line wrap: on
line diff
--- a/Core/HttpServer/MongooseServer.cpp	Thu Jul 26 14:02:20 2018 +0200
+++ b/Core/HttpServer/MongooseServer.cpp	Thu Jul 26 20:43:03 2018 +0200
@@ -611,7 +611,7 @@
     if (!server.IsRemoteAccessAllowed() &&
         !localhost)
     {
-      output.SendUnauthorized(ORTHANC_REALM);
+      output.SendUnauthorized(server.GetRealm());
       return;
     }
 
@@ -655,7 +655,7 @@
     if (server.IsAuthenticationEnabled() && 
         !IsAccessGranted(server, headers))
     {
-      output.SendUnauthorized(ORTHANC_REALM);
+      output.SendUnauthorized(server.GetRealm());
       return;
     }
 
@@ -682,7 +682,7 @@
       if (!filter->IsAllowed(method, request->uri, remoteIp,
                              username.c_str(), headers, argumentsGET))
       {
-        //output.SendUnauthorized(ORTHANC_REALM);
+        //output.SendUnauthorized(server.GetRealm());
         output.SendStatus(HttpStatus_403_Forbidden);
         return;
       }
@@ -917,6 +917,7 @@
     keepAlive_ = false;
     httpCompression_ = true;
     exceptionFormatter_ = NULL;
+    realm_ = ORTHANC_REALM;
 
 #if ORTHANC_ENABLE_SSL == 1
     // Check for the Heartbleed exploit