Conversation
Copilot
AI
changed the title
[WIP] Update server.js for 1.4.1 ops polish
chore(1.4.1): ops polish — health version, cache stampede protection, input length guards, doc updates
Aug 1, 2026
jjesse
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the remaining 1.4.1 ops-polish changes across
server.js,openapi.yaml, tests, and docs.server.jsAPP_VERSION— destructured frompackage.json; used in User-Agent (Zscaler-Datacenter-Lookup/1.4.1) and health responseMAX_TRACE_IPS = 50andMAX_PARAM_LENGTH = 256promoted out of inline usagefetchZscalerDatanow uses apendingFetches: Map<string, Promise>to coalesce concurrent requests for the same un-cached cloud into a single in-flight fetch:GET /api/lookupreturns 400 whencloud,ip, orsourceIpexceeds 256 chars;POST /api/traceadds the same check forcloud/api/health— includesversion: APP_VERSIONin responseopenapi.yamlinfo.version→1.4.1/api/healthschema includesversionstring propertyTests
res.body.version === require('../../package.json').versionGET /api/lookupwith a 257-charipreturns 400 with"Parameter too long"Docs
CHANGELOG.md—[1.4.1]section addedTODO.md— marks done: cache stampede, length guards,MAX_TRACE_IPS, author field,.nvmrc, health version,CONTRIBUTINGtreeCONTRIBUTING.md—utils/distance.jsadded to project tree.env.example—ALLOWED_ORIGINSdocumentedOriginal prompt