<commit_before>// eslint-disable-next-line new-cap
const router = require('express').Router();
const developmentOnlyController = require('../app/controllers/development-only');
const healthcheckController = require('../app/controllers/healthcheck');
const contentPageController = require('../app/controllers/content-page');

router.get('/:slug(elements)', developmentOnlyController.index);
router.get('/healthcheck', healthcheckController.index);
router.all('*', contentPageController.index);

module.exports = router;<commit_msg>Prevent assets from being routed through content controller This swaps the content controller to a regex that ignores files with a certain extension so that assets that can't be found don't route through this controller first.<commit_after>// eslint-disable-next-line new-cap
const router = require('express').Router();
const developmentOnlyController = require('../app/controllers/development-only');
const healthcheckController = require('../app/controllers/healthcheck');
const contentPageController = require('../app/controllers/content-page');

router.all('/', contentPageController.index);
router.get('/:slug(elements)', developmentOnlyController.index);
router.get('/healthcheck', healthcheckController.index);
router.all('/*(help|symptoms|conditions)/*?', contentPageController.index);

module.exports = router;
{'fraction_non_alphanumeric': 0.14232765011119347, 'fraction_numerical': 0.0, 'mean_word_length': 7.035714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7172584', 'n_tokens_mistral': 339, 'n_tokens_neox': 333, 'n_words': 82}