Skip to content
Snippets Groups Projects
Commit f0dbd259 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

simplify previous commit - .well-known/browserid really doesn't need a...

simplify previous commit - .well-known/browserid really doesn't need a template and must be sent with application/json content-type - issue #865
parent e7774d44
No related branches found
No related tags found
No related merge requests found
......@@ -116,7 +116,6 @@ exports.setup = function(app) {
try {
const publicKey = secrets.loadPublicKey();
const pkAsString = JSON.stringify(publicKey.toSimpleObject());
} catch(e){
logger.error("can't read public key, exiting: " + e);
process.nextTick(function() { process.exit(1); });
......@@ -135,9 +134,6 @@ exports.setup = function(app) {
// browserid.org as a secondary (and anyone else they decide to for
// whatever reason).
app.get("/.well-known/browserid", function(req, res) {
res.render('declaration_of_support.ejs', {
key: pkAsString,
layout: false
});
res.json({ 'public-key': publicKey.toSimpleObject() });
});
};
{
"public-key": <%- key %>
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment