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

mozilla / blurts-server / ff5e2366-5d4d-4953-b361-856e8ff7dee7

pending completion
ff5e2366-5d4d-4953-b361-856e8ff7dee7

push

circleci

Joey Zhou
adding fxa-rp-events route

282 of 1653 branches covered (17.06%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 2 files covered. (100.0%)

959 of 4485 relevant lines covered (21.38%)

3.57 hits per line

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

0.0
/src/routes/index.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 AppConstants from '../app-constants.js'
6
import express from 'express'
7

8
import adminRoutes from './admin.js'
9
import authRoutes from './auth.js'
10
import dockerFlowRoutes from './dockerflow.js'
11
import fxaRpEventsApiRoutes from './api/v1/fxa-rp-events.js'
12
import hibpApiRoutes from './api/v1/hibp.js'
13
import previewRoutes from './preview.js'
14
import userApiRoutes from './api/v1/user.js'
15
import userRoutes from './user.js'
16
import breachesRoutes from './breaches.js'
17
import breachDetailsRoutes from './breach-details.js'
18

19
import { dialog } from '../controllers/dialog.js'
20
import { landingPage } from '../controllers/landing.js'
21
import { exposureScanPage } from '../controllers/exposure-scan.js'
22
import { requestBreachScan } from '../controllers/request-breach-scan.js'
23
import { notFoundPage } from '../controllers/notFound.js'
24
import { notFound } from '../middleware/error.js'
25
import { doubleCsrfProtection } from '../utils/csrf.js'
26

27
const router = express.Router()
×
28

29
router.get('/', landingPage)
×
30
router.get('/scan', exposureScanPage)
×
31
router.get('*/dialog/:name', dialog)
×
32

33
router.use('/admin', doubleCsrfProtection, adminRoutes)
×
34
router.use('/api/v1/hibp/', hibpApiRoutes)
×
35
router.use('/api/v1/fxa-rp-events', fxaRpEventsApiRoutes)
×
36
router.use('/api/v1/scan', doubleCsrfProtection, requestBreachScan)
×
37
router.use('/api/v1/user/', doubleCsrfProtection, userApiRoutes)
×
38
router.use('/oauth', doubleCsrfProtection, authRoutes)
×
39
router.use('/user', doubleCsrfProtection, userRoutes)
×
40
router.use('/breaches', doubleCsrfProtection, breachesRoutes)
×
41
router.use('/breach-details', doubleCsrfProtection, breachDetailsRoutes)
×
42
router.use('/', doubleCsrfProtection, dockerFlowRoutes)
×
43

44
// Do not make the non-auth previews available on prod
45
if (AppConstants.NODE_ENV !== 'production') {
×
46
  router.use('/preview', previewRoutes)
×
47
}
48

49
router.use(notFound)
×
50
router.use(notFoundPage)
×
51

52
export default router
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