secure-comms-hybrid 1.0.8 → 1.0.9
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/lib/backend/constants.js
CHANGED
|
@@ -24,10 +24,10 @@ export const CRYPTO_CONFIG = {
|
|
|
24
24
|
CLEANUP_INTERVAL: 60 * 1000 // 1 minute
|
|
25
25
|
},
|
|
26
26
|
HEADERS: {
|
|
27
|
-
ENCRYPTED: 'x-
|
|
28
|
-
CLIENT_ID: 'x-
|
|
29
|
-
ENCRYPTION_ALGORITHM: '
|
|
30
|
-
SESSION_EXPIRY: '
|
|
27
|
+
ENCRYPTED: 'x-encrypted',
|
|
28
|
+
CLIENT_ID: 'x-client-id',
|
|
29
|
+
ENCRYPTION_ALGORITHM: 'x-encryption-algorithm',
|
|
30
|
+
SESSION_EXPIRY: 'x-session-expiry'
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
export const ERRORS = {
|
|
@@ -17,6 +17,7 @@ function createEncryptionMiddleware(hybridCrypto, options = {}) {
|
|
|
17
17
|
return next();
|
|
18
18
|
}
|
|
19
19
|
console.log('req.headers :>> ', req.headers);
|
|
20
|
+
console.log('req.headers[CRYPTO_CONFIG.HEADERS.ENCRYPTED] :>> ', req.headers[CRYPTO_CONFIG.HEADERS.ENCRYPTED]);
|
|
20
21
|
const isEncrypted = req.headers[CRYPTO_CONFIG.HEADERS.ENCRYPTED] === 'true';
|
|
21
22
|
const clientId = req.headers[CRYPTO_CONFIG.HEADERS.CLIENT_ID];
|
|
22
23
|
console.log(`🔍 Middleware check: Encrypted=${isEncrypted}, ClientID=${clientId}, Path=${req.path}`);
|
package/package.json
CHANGED