MCPcopy Create free account
hub / github.com/CloudBoost/cloudboost / ignoreUrl

Function ignoreUrl

middlewares.js:10–36  ·  view source on GitHub ↗
(requestUrl)

Source from the content-addressed store, hash-verified

8
9
10function 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
38function _setSession(req, res) {
39 try {

Callers 1

middlewares.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected