Skip to content

Commit

Permalink
Change HookServer to only hook on with /hook
Browse files Browse the repository at this point in the history
  • Loading branch information
azenla committed Aug 30, 2014
1 parent 3af13b6 commit da0524c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/src/server/hooks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ class HookServer extends HookMiddleware {
void start() {
HttpServer.bind(host, port).then((HttpServer server) {
_server = server;
server.listen(handleHookRequest);
server.listen((request) {
if (request.uri.path == "/hook") {
handleHookRequest(request);
} else {
request.response.statusCode = 404;
request.response.write("404 - Not Found");
request.response.close();
}
});
});
}

Expand Down

0 comments on commit da0524c

Please sign in to comment.