diff --git a/app.js b/app.js index ad58bda..c9a42d9 100755 --- a/app.js +++ b/app.js @@ -63,10 +63,18 @@ if (use_content_security_policy) { app.use(helmet.contentSecurityPolicy({ directives:{ defaultSrc:["'self'"], - scriptSrc:["'self'", "'unsafe-inline'", 'static.robotwebtools.org', 'robotwebtools.org', 'webrtc.github.io'], + scriptSrc:["'self'", "'unsafe-inline'", + 'static.robotwebtools.org', + 'robotwebtools.org', + 'webrtc.github.io', + 'www.gstatic.com', + 'code.jquery.com', + 'cdnjs.cloudflare.com', + 'stackpath.bootstrapcdn.com'], connectSrc:["'self'", 'ws://localhost:9090'], imgSrc: ["'self'", 'data:'], - styleSrc:["'self'"], + styleSrc:["'self'", + 'stackpath.bootstrapcdn.com'], fontSrc:["'self'"]}})); } else { // Disable the content security policy. This is helpful during @@ -90,12 +98,12 @@ console.log('require https'); app.all('*', ensureSecure); // at top of routing calls function ensureSecure(req, res, next){ - if(req.secure){ - // OK, continue - return next(); - }; - // handle port numbers if you need non defaults - res.redirect('https://' + req.hostname + req.url); + if(!req.secure){ + // handle port numbers if you need non defaults + res.redirect('https://' + req.hostname + req.url); + } + + return next(); }; ///////////////////////// diff --git a/bash_scripts/web_interface_installation.sh b/bash_scripts/web_interface_installation.sh index 1aa807e..96fdd37 100755 --- a/bash_scripts/web_interface_installation.sh +++ b/bash_scripts/web_interface_installation.sh @@ -15,6 +15,12 @@ echo "Installing rosbridge" sudo apt-get --yes install ros-melodic-rosbridge-server echo "Done." +# TF2 +echo "" +echo "Installing tf2-web-republisher" +sudo apt-get --yes install ros-melodic-tf2-web-republisher +echo "Done." + # NODE 14 echo "" echo "Installing Node.js 14" diff --git a/operator/operator.html b/operator/operator.html index 6633852..db637c7 100644 --- a/operator/operator.html +++ b/operator/operator.html @@ -3,10 +3,18 @@
+ + + + + - - + + + + + @@ -386,9 +394,17 @@ + + + + + --> - - - - - + + + + +