• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / #13412

pending completion
#13412

push

circleci

Vinnl
Add unique page titles

282 of 1792 branches covered (15.74%)

Branch coverage included in aggregate %.

959 of 4671 relevant lines covered (20.53%)

1.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/controllers/landing.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
import { getMessage } from '../utils/fluent.js'
6
import { getCountryCode } from '../utils/countryCode.js'
7
import { guestLayout } from '../views/guestLayout.js'
8
import { generateToken } from '../utils/csrf.js'
9
import { landing } from '../views/partials/landing.js'
10

11
function landingPage (req, res) {
12
  const data = {
×
13
    partial: landing,
14
    csrfToken: generateToken(res),
15
    countryCode: getCountryCode(req),
16
    meta: {
17
      title: getMessage('brand-fx-monitor'),
18
      socialTitle: getMessage('brand-fx-monitor'),
19
      socialDescription: getMessage('meta-desc-2')
20
    }
21
  }
22

23
  // Backward-compatibility with Monitor V1, for SEO.
24
  if (req.query.breach) {
×
25
    const breach = encodeURIComponent(req.query.breach)
×
26
    return res.redirect(`/breach-details/${breach}`)
×
27
  }
28

29
  res.send(guestLayout(data))
×
30
}
31

32
export { landingPage }
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc