mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-10 20:25:34 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f690e4a705 | ||
|
|
3e14d3049d |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "firefox-send",
|
"name": "firefox-send",
|
||||||
"version": "3.0.5",
|
"version": "3.0.6",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "firefox-send",
|
"name": "firefox-send",
|
||||||
"description": "File Sharing Experiment",
|
"description": "File Sharing Experiment",
|
||||||
"version": "3.0.5",
|
"version": "3.0.6",
|
||||||
"author": "Mozilla (https://mozilla.org)",
|
"author": "Mozilla (https://mozilla.org)",
|
||||||
"repository": "mozilla/send",
|
"repository": "mozilla/send",
|
||||||
"homepage": "https://github.com/mozilla/send/",
|
"homepage": "https://github.com/mozilla/send/",
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ module.exports = function(state, body = '') {
|
|||||||
<head>
|
<head>
|
||||||
<title>${state.title}</title>
|
<title>${state.title}</title>
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
<meta
|
<meta name="robots" content="${state.robots},noarchive" />
|
||||||
name="robots"
|
|
||||||
content="${state.route === 'download/:id' ? 'none' : 'all'},noarchive"
|
|
||||||
/>
|
|
||||||
<meta name="google" content="nositelinkssearchbox" />
|
<meta name="google" content="nositelinkssearchbox" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ const { getFxaConfig } = require('./fxa');
|
|||||||
module.exports = async function(req) {
|
module.exports = async function(req) {
|
||||||
const locale = req.language || 'en-US';
|
const locale = req.language || 'en-US';
|
||||||
let authConfig = null;
|
let authConfig = null;
|
||||||
|
let robots = 'none';
|
||||||
|
if (req.route && req.route.path === '/') {
|
||||||
|
robots = 'all';
|
||||||
|
}
|
||||||
if (config.fxa_client_id) {
|
if (config.fxa_client_id) {
|
||||||
try {
|
try {
|
||||||
authConfig = await getFxaConfig();
|
authConfig = await getFxaConfig();
|
||||||
@@ -33,7 +37,7 @@ module.exports = async function(req) {
|
|||||||
fileInfo: {},
|
fileInfo: {},
|
||||||
cspNonce: req.cspNonce,
|
cspNonce: req.cspNonce,
|
||||||
user: { avatar: assets.get('user.svg'), loggedIn: false },
|
user: { avatar: assets.get('user.svg'), loggedIn: false },
|
||||||
route: req.route ? req.route.path : null,
|
robots,
|
||||||
authConfig,
|
authConfig,
|
||||||
layout
|
layout
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user