Инструменты пользователя

Инструменты сайта


orthanc

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
orthanc [2022/02/01 02:23]
sector
orthanc [2022/05/27 02:34]
sector
Строка 186: Строка 186:
       return false       return false
    end    end
 +end
 +
 +</code>
 +
 +
 +Можно по ip
 +
 +<code | ini>
 +
 +function IncomingHttpRequestFilter(method, uri, ip, username, httpHeaders)
 +  if method == 'GET' and (username == 'user' or username == 'admin') then
 +    -- Read-only access (only GET method is allowed)
 +    return true
 +  elseif username == 'admin' and ip == '127.0.0.1' then
 +    -- Read-write access for administrator (any HTTP method is allowed on localhost)
 +    return true
 +  else
 +    -- Access is disallowed by default
 +    return false
 +  end
 end end
  
Строка 222: Строка 242:
 </code> </code>
  
-  +Удаление старых записей 
 +<code | ini> 
 + $ curl --user admin:password http://localhost:8042/tools/find -d '{"Level":"Study","Query":{"StudyDate":"20120101-20121231"}}' 
 +
 +   "6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12", 
 +   "ef2ce55f-9342856a-aee23907-2667e859-9f3b734d" 
 +
 +$ curl -X DELETE http://localhost:8042/studies/6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12 
 +$ curl -X DELETE http://localhost:8042/studies/ef2ce55f-9342856a-aee23907-2667e859-9f3b734d 
 +</code>
  
orthanc.txt · Последнее изменение: 2022/05/27 02:34 — sector

Яндекс.Метрика