pinokiod 3.263.0 → 3.265.0
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
package/server/index.js
CHANGED
|
@@ -4882,8 +4882,10 @@ class Server {
|
|
|
4882
4882
|
}
|
|
4883
4883
|
//res.render(`connect/${req.params.provider}`, {
|
|
4884
4884
|
const config = this.kernel.connect.config[req.params.provider]
|
|
4885
|
+
const isPinokioHost = req.hostname === 'pinokio.localhost'
|
|
4886
|
+
const renderProtocol = isPinokioHost ? 'https' : 'http'
|
|
4885
4887
|
res.render(`connect/index`, {
|
|
4886
|
-
protocol:
|
|
4888
|
+
protocol: renderProtocol,
|
|
4887
4889
|
name: req.params.provider,
|
|
4888
4890
|
config,
|
|
4889
4891
|
portal: this.portal,
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
|
|
259
259
|
<script>
|
|
260
260
|
const CONNECT_NAME = "<%=name%>"
|
|
261
|
-
const isSecureConnectContext =
|
|
261
|
+
const isSecureConnectContext = <%= protocol === "https" ? 'true' : 'false' %>
|
|
262
262
|
const statusElement = document.getElementById('status')
|
|
263
263
|
const loaderElement = document.getElementById('connect-loader')
|
|
264
264
|
const loaderMessageElement = document.getElementById('loader-message')
|
|
@@ -417,15 +417,10 @@
|
|
|
417
417
|
setStatus('Failed to logout: ' + err.message, 'error')
|
|
418
418
|
} finally {
|
|
419
419
|
hideLoader()
|
|
420
|
-
if (loginSection) {
|
|
421
|
-
loginSection.classList.remove('hidden')
|
|
422
|
-
}
|
|
423
|
-
if (httpSection) {
|
|
424
|
-
httpSection.classList.remove('hidden')
|
|
425
|
-
}
|
|
426
420
|
if (userSection) {
|
|
427
421
|
userSection.classList.add('hidden')
|
|
428
422
|
}
|
|
423
|
+
configureInitialView()
|
|
429
424
|
}
|
|
430
425
|
}
|
|
431
426
|
|
|
@@ -680,8 +675,7 @@
|
|
|
680
675
|
setStatus('Waiting for connection...', 'warning')
|
|
681
676
|
const secureWindow = window.open(SECURE_CONNECT_URL, '_blank')
|
|
682
677
|
if (!secureWindow) {
|
|
683
|
-
window.
|
|
684
|
-
return
|
|
678
|
+
setStatus('Could not open the secure window. Please allow pop-ups or open https://pinokio.localhost/connect/<%=name%> manually.', 'error')
|
|
685
679
|
}
|
|
686
680
|
pollConnectStatus()
|
|
687
681
|
connectPollTimer = setInterval(pollConnectStatus, CONNECT_POLL_INTERVAL)
|