Skip to content
Snippets Groups Projects
Commit 5968549e authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Disable the development menu in staging and prod using the configuration "enable_development_menu"

issue #1733
parent 303dc9d1
No related branches found
No related tags found
No related merge requests found
......@@ -21,5 +21,7 @@
},
"proxy": { "bind_to": { "port": 10006 } },
"router": { "bind_to": { "port": 8080 } },
"kpi_backend_db_url" : "https://kpiggybank.hacksign.in/wsapi/interaction_data"
"kpi_backend_db_url" : "https://kpiggybank.hacksign.in/wsapi/interaction_data",
// whether to show the development menu.
"enable_development_menu": true
}
......@@ -12,5 +12,8 @@
"express_log_format": "dev_bid",
"email_to_console": true,
"env": "local",
"kpi_backend_sample_rate": 1.0
"kpi_backend_sample_rate": 1.0,
// whether to show the development menu.
"enable_development_menu": true
}
......@@ -50,7 +50,10 @@
"dbwriter_url": "http://127.0.0.1:62900",
"browserid": { "bind_to": { "port": 62700 } },
"browserid_url": "http://127.0.0.1:62700",
"router": { "bind_to": { "port": 63300 } }
"router": { "bind_to": { "port": 63300 } },
// set to true to enable the development menu.
"enable_development_menu": false
// http_proxy should be overridded per env
//"http_proxy": {
......
......@@ -38,6 +38,9 @@ function renderCachableView(req, res, template, options) {
res.setHeader('Date', new Date().toUTCString());
res.setHeader('Vary', 'Accept-Encoding,Accept-Language');
res.setHeader('Content-Type', 'text/html; charset=utf8');
options.enable_development_menu = config.get('enable_development_menu');
res.render(template, options);
}
......
......@@ -219,6 +219,10 @@ var conf = module.exports = convict({
declaration_of_support_timeout_ms: {
doc: "The amount of time we wait for a server to respond with a declaration of support, before concluding that they are not a primary. Only relevant when our local proxy is in use, not in production or staging",
format: 'integer = 15000'
},
enable_development_menu: {
doc: "Whether or not the development menu can be accessed",
format: 'boolean = false'
}
});
......
......@@ -20,7 +20,9 @@
</head>
<body class="waiting">
<header id="header">
<a href="#" id="showDevelopment">&nbsp;</a>
<% if (enable_development_menu) { %>
<a href="#" id="showDevelopment">&nbsp;</a>
<% } %>
<h1><a class="home" target="_blank" href="/">Mozilla Persona Home</a></h1>
</header>
......
......@@ -18,7 +18,9 @@
<title><%= format(gettext("Mozilla Persona: %s"), [title]) %></title>
</head>
<body class="loading">
<a href="#" id="showDevelopment">&nbsp;</a>
<% if (enable_development_menu) { %>
<a href="#" id="showDevelopment">&nbsp;</a>
<% } %>
<div id="errorBackground"></div>
<div id="wrapper">
......
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