mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Migrates the Overleaf monorepo package manager from npm (v11) to Yarn 4 (v4.9.1) using node-modules linker mode. GitOrigin-RevId: 50d32ab01955c15e29679eff9e9e9cfb897fab2d
14 lines
643 B
Diff
14 lines
643 B
Diff
diff --git a/lib/utils.js b/lib/utils.js
|
|
index 486f9e1..4584507 100644
|
|
--- a/lib/utils.js
|
|
+++ b/lib/utils.js
|
|
@@ -24,7 +24,7 @@ exports.originalURL = function(req, options) {
|
|
var trustProxy = options.proxy;
|
|
|
|
var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase()
|
|
- , tls = req.connection.encrypted || (trustProxy && 'https' == proto.split(/\s*,\s*/)[0])
|
|
+ , tls = (req.connection && req.connection.encrypted) || (trustProxy && 'https' == proto.split(/\s*,\s*/)[0])
|
|
, host = (trustProxy && req.headers['x-forwarded-host']) || req.headers.host
|
|
, protocol = tls ? 'https' : 'http'
|
|
, path = req.url || '';
|