diff --git a/README.md b/README.md index 0265a9d..8da7613 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,12 @@ app.use(auth((user_name) => { when a client logs in, it will set a header called 'session' that the client can use to authorize the following requests. it also sets a cookie to make requesting from the client more simple. (cookie parser is needed to make authentication with cookies possible) + +## Excluding routes + +exceptions to the auth module can be added by adding an array of regular expressions +a specific method can also be filtered for by giving an object instead of a plain regular expression. + +```js +auth(..., [/no-auth/, {regex: '/no-auth-post/', method: 'POST'}]); +``` \ No newline at end of file