Fix public HTTPS API discovery metadata #22
No reviewers
Labels
No labels
bug
priority:high
status:active
status:inprogress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/erikvancraddock.com!22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task-4cb7f355-https-api-metadata"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes task-4cb7f355: API metadata advertises HTTP URLs on HTTPS website.
@evcraddock/slug-api@0.1.1computes API URLs fromnew URL(input.requestUrl).origin, and the local metadata route passedcontext.req.url. A TLS-terminating proxy supplies an internal HTTP request while the persisted site URL correctly uses HTTPS.src/api/README.md.Verification
npm run build: passed.npm run typecheck: passed.npm run lint: passed.npm run test:ci: 399 tests passed across 45 files.npm test: 475 tests passed across 52 files, including integrations.git diff --check: passed.Acceptance criteria / rollout
After merge, use the gated web release/deployment workflow. Fetch
https://erikvancraddock.com/api/v1/metawithout credentials and verifyapi.baseUrlishttps://erikvancraddock.com/api/v1andapi.openapiUrlishttps://erikvancraddock.com/api/v1/openapi.json. Retry Rott discovery against the HTTPS website and confirm it proceeds beyondAPI requires HTTPS. Do not infer API-key validity from discovery. Keep the task open until production and Rott verification are complete.Review update
9bccbbf0d306d19a9b364be4e72dc12ecebd77a9.Acceptance criteria
@evcraddock/slug-api@0.1.1usesnew URL(input.requestUrl).origin; the previous route passedcontext.req.url. Thus proxy-facing HTTP determines advertised API URLs despite HTTPS site configuration. The replacement passessite.url.Blocking issues (2)
https://erikvancraddock.com/api/v1andhttps://erikvancraddock.com/api/v1/openapi.json.API requires HTTPSwithout weakening HTTPS checks. Discovery does not establish API-key validity.