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

mozilla / blurts-server / #13198

pending completion
#13198

push

circleci

Vinnl
Allow scanning for exposures without logging in

Co-authored-by: Robert Helmer <rhelmer@mozilla.com>

282 of 1653 branches covered (17.06%)

Branch coverage included in aggregate %.

107 of 107 new or added lines in 9 files covered. (100.0%)

959 of 4482 relevant lines covered (21.4%)

1.78 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 { getCountryCode } from '../utils/country-code.js'
6
import { guestLayout } from '../views/guestLayout.js'
7
import { generateToken } from '../utils/csrf.js'
8
import { landing } from '../views/partials/landing.js'
9

10
function landingPage (req, res) {
11
  const data = {
×
12
    partial: landing,
13
    nonce: res.locals.nonce,
14
    csrfToken: generateToken(res),
15
    countryCode: getCountryCode(req)
16
  }
17

18
  // Backward-compatibility with Monitor V1, for SEO.
19
  if (req.query.breach) {
×
20
    const breach = encodeURIComponent(req.query.breach)
×
21
    return res.redirect(`/breach-details/${breach}`)
×
22
  }
23

24
  res.send(guestLayout(data))
×
25
}
26

27
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