MCPcopy Create free account
hub / github.com/parse-community/parse-dashboard / isLocalRequest

Function isLocalRequest

Parse-Dashboard/app.js:93–97  ·  view source on GitHub ↗

* Checks whether a request is from localhost.

(req)

Source from the content-addressed store, hash-verified

91 * Checks whether a request is from localhost.
92 */
93 function isLocalRequest(req) {
94 return req.connection.remoteAddress === '127.0.0.1' ||
95 req.connection.remoteAddress === '::ffff:127.0.0.1' ||
96 req.connection.remoteAddress === '::1';
97 }
98
99 /**
100 * Middleware that enforces remote access restrictions:

Callers 2

app.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected