@opengis/fastify-table 1.3.13 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ function close() {
|
|
|
11
11
|
|
|
12
12
|
async function getHeadersPG(req, config) {
|
|
13
13
|
if (!req.headers?.token) return null;
|
|
14
|
-
const validToken = (req.ip === '127.0.0.1' || req.ip.startsWith('192.168.') || config.debug) && req.headers?.
|
|
14
|
+
const validToken = (req.ip === '193.239.152.181' || req.ip === '127.0.0.1' || req.ip.startsWith('192.168.') || config.debug) && req.headers?.token && config.auth?.tokens?.includes?.(req.headers.token);
|
|
15
15
|
|
|
16
16
|
if (validToken && req.headers?.db) {
|
|
17
17
|
const pg = pgClients[req.headers.db]
|
|
@@ -67,7 +67,6 @@ export default function checkPolicy(req, reply) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
const validToken = (req.ip === '193.239.152.181' || req.ip === '127.0.0.1' || req.ip?.startsWith?.('192.168.') || config.debug)
|
|
70
|
-
&& req.headers?.uid
|
|
71
70
|
&& req.headers?.token
|
|
72
71
|
&& config.auth?.tokens?.includes?.(headers.token);
|
|
73
72
|
|