|
1 | 1 | import type { Response, NextFunction } from 'express' |
2 | 2 | import got from 'got' |
3 | 3 |
|
4 | | -import statsd from '@/observability/lib/statsd.js' |
| 4 | +import statsd from '@/observability/lib/statsd' |
5 | 5 | import { |
6 | 6 | firstVersionDeprecatedOnNewSite, |
7 | 7 | lastVersionWithoutArchivedRedirectsFile, |
8 | 8 | deprecatedWithFunctionalRedirects, |
9 | 9 | firstReleaseStoredInBlobStorage, |
10 | | -} from '@/versions/lib/enterprise-server-releases.js' |
11 | | -import patterns from '@/frame/lib/patterns.js' |
12 | | -import versionSatisfiesRange from '@/versions/lib/version-satisfies-range.js' |
| 10 | +} from '@/versions/lib/enterprise-server-releases' |
| 11 | +import patterns from '@/frame/lib/patterns' |
| 12 | +import versionSatisfiesRange from '@/versions/lib/version-satisfies-range' |
13 | 13 | import { isArchivedVersion } from '@/archives/lib/is-archived-version' |
14 | | -import { |
15 | | - setFastlySurrogateKey, |
16 | | - SURROGATE_ENUMS, |
17 | | -} from '@/frame/middleware/set-fastly-surrogate-key.js' |
18 | | -import { readCompressedJsonFileFallbackLazily } from '@/frame/lib/read-json-file.js' |
19 | | -import { archivedCacheControl, languageCacheControl } from '@/frame/middleware/cache-control.js' |
| 14 | +import { setFastlySurrogateKey, SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key' |
| 15 | +import { readCompressedJsonFileFallbackLazily } from '@/frame/lib/read-json-file' |
| 16 | +import { archivedCacheControl, languageCacheControl } from '@/frame/middleware/cache-control' |
20 | 17 | import { pathLanguagePrefixed, languagePrefixPathRegex } from '@/languages/lib/languages' |
21 | | -import getRedirect, { splitPathByLanguage } from '@/redirects/lib/get-redirect.js' |
22 | | -import getRemoteJSON from '@/frame/lib/get-remote-json.js' |
| 18 | +import getRedirect, { splitPathByLanguage } from '@/redirects/lib/get-redirect' |
| 19 | +import getRemoteJSON from '@/frame/lib/get-remote-json' |
23 | 20 | import { ExtendedRequest } from '@/types' |
24 | 21 |
|
25 | 22 | const OLD_PUBLIC_AZURE_BLOB_URL = 'https://githubdocs.azureedge.net' |
@@ -75,7 +72,7 @@ const cacheAggressively = (res: Response) => { |
75 | 72 | // 3. ~4000ms |
76 | 73 | // |
77 | 74 | // ...if the limit we set is 3. |
78 | | -// Our own timeout, in #src/frame/middleware/timeout.js defaults to 10 seconds. |
| 75 | +// Our own timeout, in @/frame/middleware/timeout.js defaults to 10 seconds. |
79 | 76 | // So there's no point in trying more attempts than 3 because it would |
80 | 77 | // just timeout on the 10s. (i.e. 1000 + 2000 + 4000 + 8000 > 10,000) |
81 | 78 | const retryConfiguration = { limit: 3 } |
|
0 commit comments