Skip to content

Commit

Permalink
Pass the session from the SNI handler to checkRequest so the category
Browse files Browse the repository at this point in the history
and other stuff gets attached to the session. Should make everything
work better with HTTPS traffic.
  • Loading branch information
mahotz committed Dec 24, 2016
1 parent c04a6fd commit e0358f8
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,16 @@ private void checkClientRequest(NodeTCPSession sess, ByteBuffer data)
*/
HttpRequestEvent evt = new HttpRequestEvent(requestLine, domain, null, 0);
requestLine.setHttpRequestEvent(evt);

this.node.logEvent(evt);

// attach the hostname we extracted to the session
sess.globalAttach(NodeSession.KEY_HTTP_HOSTNAME, domain);

HeaderToken h = new HeaderToken();
h.addField("host", domain);

String nonce = node.getDecisionEngine().checkRequest(null, sess.getClientAddr(), 443, rlt, h);

sess.globalAttach(NodeSession.KEY_HTTP_HOSTNAME, domain);
// pass the info to the decision engine to see if we should block
String nonce = node.getDecisionEngine().checkRequest(sess, sess.getClientAddr(), 443, rlt, h);

// we have decided to block so we create the SSL engine and start
// by passing it all the client data received thus far
Expand Down

0 comments on commit e0358f8

Please sign in to comment.