Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ep_hide_referrer

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_hide_referrer - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

templates/redirect.html

8

index.js

@@ -0,7 +1,9 @@

var path = require("path");
var eejs = require('ep_etherpad-lite/node/eejs');
exports.registerRoute = function (hook_name, args, callback) {
args.app.get('/redirect', function(req, res) {
res.send(
"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n <title>External link</title>\n <script type=\"text/javascript\">\n window.redir_onload = function() {\n var urlhash = location.hash.substr(1);\n if (urlhash.search(':')<0) {\n urlhash = unescape(urlhash);\n }\n if (urlhash.search(/^https?:\\/\\//) !== 0) {\n urlhash = '';\n }\n var the_content = document.getElementById('content');\n if (urlhash) {\n the_content.innerHTML =\n '<h4>Click to visit this exteral link</h4><h3><a href=\"'+urlhash+'\">'+urlhash+'</a></h3>';\n } else {\n the_content.innerHTML = '<h4>Nothing to see here. Move along</h4>';\n }\n };\n </script>\n</head>\n<body onload=\"redir_onload()\">\n<div id=\"content\" style=\"text-align:center\">For the next trick, we'll need a volunteer with javascript enabled :)</div>\n</body>\n</html>"
);
console.log(__dirname);
res.send(eejs.require(__dirname + "/templates/redirect.html"));
});
}
{
"name": "ep_hide_referrer",
"description": "Don't pass the referring URL to third parties. This handles the security/privacy issue where you don't want the third party service to know your pad URL. Improves Privacy.",
"version": "0.0.8",
"version": "0.0.9",
"author": "johnyma22 (John McLear) <john@mclear.co.uk>",

@@ -6,0 +6,0 @@ "contributors": [ ],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc