| 8 | |
| 9 | |
| 10 | function ignoreUrl(requestUrl) { |
| 11 | try { |
| 12 | const ignoreUrls = [ // for the routes to check whether the particular service is active/not |
| 13 | '/api/userService', |
| 14 | '/api/customService', |
| 15 | '/api/roleService', |
| 16 | '/api/status', |
| 17 | '/file', |
| 18 | '/api/createIndex', |
| 19 | '/pages', |
| 20 | '/status', |
| 21 | ]; |
| 22 | |
| 23 | for (let i = 0; i < ignoreUrls.length; i++) { |
| 24 | if (requestUrl.indexOf(ignoreUrls[i]) >= 0) { |
| 25 | return true; |
| 26 | } |
| 27 | } |
| 28 | return false; |
| 29 | } catch (err) { |
| 30 | winston.log('error', { |
| 31 | error: String(err), |
| 32 | stack: new Error().stack, |
| 33 | }); |
| 34 | throw err; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | function _setSession(req, res) { |
| 39 | try { |