guacamole url
This commit is contained in:
@@ -39,6 +39,7 @@ const passport = require('./passport-okta');
|
||||
|
||||
const QMI_MONGO_URL = process.env.QMI_MONGO_URL || "http://host.docker.internal:8081/";
|
||||
const BACKEND_LOGS_URL = process.env.BACKEND_LOGS_URL || "http://host.docker.internal:8888/";
|
||||
const GUACAMOLE_URL = process.env.GUACAMOLE_URL || "http://qmicloud-dev.qliktech.com:8080/guacamole/";
|
||||
|
||||
const IS_SECURE = process.env.CERT_PFX_PASSWORD && process.env.CERT_PFX_FILENAME;
|
||||
|
||||
@@ -129,12 +130,13 @@ passport.init(app, IS_SECURE ? true : false);
|
||||
GUACAMOLE
|
||||
*/
|
||||
app.use('/guacamole/', passport.ensureAuthenticatedAndVPNDoLogin, createProxyMiddleware({
|
||||
target: 'http://qmicloud-dev.qliktech.com:8080/guacamole/',
|
||||
target: GUACAMOLE_URL,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
followRedirects: true,
|
||||
secure: false,
|
||||
onProxyReq: function (proxyReq, req, res) {
|
||||
console.log("Guac User", req.user);
|
||||
if (req.user && req.user.mail) {
|
||||
proxyReq.setHeader('X-Guaca-Auth', req.user.mail);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user