comparison Core/HttpServer/MongooseServer.h @ 1961:ef1e9856c26f

New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Apr 2016 17:26:13 +0200
parents 45c4387a379c
children a3a65de1840f
comparison
equal deleted inserted replaced
1960:239e50b3792f 1961:ef1e9856c26f
30 **/ 30 **/
31 31
32 32
33 #pragma once 33 #pragma once
34 34
35 #include "IHttpHandler.h" 35 #include "IIncomingHttpRequestFilter.h"
36 36
37 #include "../OrthancException.h" 37 #include "../OrthancException.h"
38 38
39 #include <list> 39 #include <list>
40 #include <map> 40 #include <map>
44 44
45 namespace Orthanc 45 namespace Orthanc
46 { 46 {
47 class ChunkStore; 47 class ChunkStore;
48 48
49 class IIncomingHttpRequestFilter 49 class IHttpExceptionFormatter : public boost::noncopyable
50 {
51 public:
52 virtual ~IIncomingHttpRequestFilter()
53 {
54 }
55
56 virtual bool IsAllowed(HttpMethod method,
57 const char* uri,
58 const char* ip,
59 const char* username,
60 const IHttpHandler::Arguments& httpHeaders) const = 0;
61 };
62
63
64 class IHttpExceptionFormatter
65 { 50 {
66 public: 51 public:
67 virtual ~IHttpExceptionFormatter() 52 virtual ~IHttpExceptionFormatter()
68 { 53 {
69 } 54 }