diff --git a/lib/browserid/views.js b/lib/browserid/views.js index d4dbd13e84414386eff4d5dc20acfaddce70431e..412609c48bcb3ee5314cf3ed8f4023d68c9687fc 100644 --- a/lib/browserid/views.js +++ b/lib/browserid/views.js @@ -114,18 +114,4 @@ exports.setup = function(app) { app.get("/pk", function(req, res) { res.json(publicKey.toSimpleObject()); }); - - // vep bundle of JavaScript - try { - const vepBundleFilePath = path.join(__dirname, "..", "..", "node_modules", "jwcrypto", "vepbundle.js"); - var vepBundleFile = fs.readFileSync(vepBundleFilePath); - } catch(e) { - logger.error("can't read vepbundle file (" + vepBundleFilePath +"): " + e); - } - - app.get("/vepbundle", function(req, res) { - res.writeHead(200, {'Content-Type': 'text/javascript'}); - res.write(vepBundleFile); - res.end(); - }); }; diff --git a/resources/static/communication_iframe/iframe.js b/resources/static/communication_iframe/iframe.js index da4e50dfba37a28ed08b6d09d99b658ee0e148c1..30e37ac1d48934ba3e2e37eddbb4abad42922552 100644 --- a/resources/static/communication_iframe/iframe.js +++ b/resources/static/communication_iframe/iframe.js @@ -44,6 +44,7 @@ steal .then('../lib/jschannel', '../lib/base64', '../lib/underscore-min', + '../lib/vepbundle', '../dialog/resources/channel', '../shared/browserid', '../shared/storage', diff --git a/resources/static/dialog/dialog.js b/resources/static/dialog/dialog.js index c84c1a7457661b209bbad3210b7c0de09ac49cc4..6bbaaeb037d49d4b75b44807dd62503474fec028 100644 --- a/resources/static/dialog/dialog.js +++ b/resources/static/dialog/dialog.js @@ -49,6 +49,7 @@ steal '../lib/jschannel', '../lib/base64', '../lib/underscore-min', + '../lib/vepbundle', '../lib/ejs', '../shared/browserid', '../lib/dom-jquery', diff --git a/resources/static/lib/vepbundle.js b/resources/static/lib/vepbundle.js new file mode 120000 index 0000000000000000000000000000000000000000..99cb32376ee635d267c21a3ede971c60fff554f1 --- /dev/null +++ b/resources/static/lib/vepbundle.js @@ -0,0 +1 @@ +../../../node_modules/jwcrypto/vepbundle.js \ No newline at end of file diff --git a/resources/static/test/qunit.html b/resources/static/test/qunit.html index 5ca813c687215df09e5eaf8ba1372aa2805cd5ef..1af7410adb136f66065df84878b87a2511c6eef5 100644 --- a/resources/static/test/qunit.html +++ b/resources/static/test/qunit.html @@ -2,7 +2,6 @@ <head> <link rel="stylesheet" type="text/css" href="/funcunit/qunit/qunit.css" /> <title>BrowserID QUnit Test</title> - <script type='text/javascript' src='/vepbundle'></script> <script type='text/javascript' src='/steal/steal.js?/test/qunit'></script> </head> <body> diff --git a/resources/views/communication_iframe.ejs b/resources/views/communication_iframe.ejs index b7fb8d007befcb2d2438a9a2ff788b5fd163d819..1dc71765a05deec4ee12ce2c12e12e5dfc13cc80 100644 --- a/resources/views/communication_iframe.ejs +++ b/resources/views/communication_iframe.ejs @@ -1,4 +1,3 @@ <head><title>non-interactive iframe</title> - <script type="text/javascript" src="/vepbundle"></script> <script type="text/javascript" src="steal/steal<%= production ? '.production' : '' %>.js?communication_iframe/iframe.js"></script> </head><body></body> diff --git a/resources/views/dialog_layout.ejs b/resources/views/dialog_layout.ejs index 3d515360ccf4cbc8d71b9f5d5cbc11a4ea7eaa61..b638047c844917a6afa35f18d310c98b8f02f721 100644 --- a/resources/views/dialog_layout.ejs +++ b/resources/views/dialog_layout.ejs @@ -45,7 +45,6 @@ </div> <% if (useJavascript !== false) { %> - <script type="text/javascript" src="/vepbundle"></script> <script type="text/javascript" src="steal/steal<%= production ? '.production' : '' %>.js?dialog"></script> <% } %> </body> diff --git a/resources/views/layout.ejs b/resources/views/layout.ejs index 8f942a62161bf99e744ac94970ab0563b2461ca5..549618dd91e8e67039a4b150527764c8dbeeb71b 100644 --- a/resources/views/layout.ejs +++ b/resources/views/layout.ejs @@ -7,7 +7,6 @@ <script src="/js/html5shim.js"></script> <![endif]--> <link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700,700italic' rel='stylesheet' type='text/css'> - <script src="/vepbundle" type="text/javascript"></script> <% if (production) { %> <link rel="stylesheet" type="text/css" href="/css/browserid.min.css"> <script src="/pages/lib.min.js" type="text/javascript"></script> @@ -15,6 +14,7 @@ <link rel="stylesheet" href="/css/style.css" type="text/css" media="screen"> <link rel="stylesheet" href="/css/m.css" type="text/css" media="screen"> + <script src="/lib/vepbundle.js" type="text/javascript"></script> <script src="/lib/jquery-1.6.2.min.js" type="text/javascript"></script> <script src="/lib/json2.js" type="text/javascript"></script> <script src="/lib/underscore-min.js" type="text/javascript"></script>