#include <microhttpd.h>
-#include "afb-req-itf.h"
+#include <afb/afb-req-itf.h>
#include "afb-context.h"
#include "afb-hreq.h"
#include "afb-apis.h"
return 1;
}
+ if (!hreq->context.validated) {
+ afb_hreq_reply_error(hreq, MHD_HTTP_UNAUTHORIZED);
+ return 1;
+ }
+
return afb_websock_check_upgrade(hreq);
}