(reqPath, requestedVersion)
| 236 | // for >=2.13: /2.13/en/enterprise/2.13/user/articles/viewing-contributions-on-your-profile |
| 237 | // for <2.13: /2.12/user/articles/viewing-contributions-on-your-profile |
| 238 | function getProxyPath(reqPath, requestedVersion) { |
| 239 | if (versionSatisfiesRange(requestedVersion, `>=${firstReleaseStoredInBlobStorage}`)) { |
| 240 | const newReqPath = reqPath.includes('redirects.json') ? `/${reqPath}` : reqPath + '/index.html' |
| 241 | return `${REMOTE_ENTERPRISE_STORAGE_URL}/${requestedVersion}${newReqPath}` |
| 242 | } |
| 243 | const proxyPath = versionSatisfiesRange(requestedVersion, `>=${firstVersionDeprecatedOnNewSite}`) |
| 244 | ? slash(path.join('/', requestedVersion, reqPath)) |
| 245 | : reqPath.replace(/^\/enterprise/, '') |
| 246 | return `https://github.github.com/help-docs-archived-enterprise-versions${proxyPath}` |
| 247 | } |
| 248 | |
| 249 | // Module-level global cache object. |
| 250 | // Get's populated lazily inside getFallbackRedirect(). |
no test coverage detected