We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60b8340 commit dbcb3a5Copy full SHA for dbcb3a5
1 file changed
middleware/is-archived-version.js
@@ -4,7 +4,9 @@ const { deprecated } = require('../lib/enterprise-server-releases')
4
module.exports = async (req, res, next) => {
5
// if this is an assets path, use the referrer
6
// if this is a docs path, use the req.path
7
- const pathToCheck = req.get('referrer') || req.path
+ const pathToCheck = patterns.assetPaths.test(req.path)
8
+ ? req.get('referrer')
9
+ : req.path
10
11
// ignore paths that don't have an enterprise version number
12
if (!(patterns.getEnterpriseVersionNumber.test(pathToCheck) || patterns.getEnterpriseServerNumber.test(pathToCheck))) return next()
0 commit comments