API metadata advertises HTTP URLs on HTTPS website #21
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#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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
The production website serves its API over HTTPS but advertises HTTP API URLs in its metadata. This blocks Rott website connection verification. Observed October 13, 2026; underlying cause is not yet established.
Steps to reproduce
curl -sS https://erikvancraddock.com/api/v1/meta(no credentials required).api.baseUrlandapi.openapiUrlin the HTTP 200 response.https://erikvancraddock.com.Expected behavior
https://erikvancraddock.com/api/v1andhttps://erikvancraddock.com/api/v1/openapi.json, consistent with the public HTTPS endpoint.Actual behavior
site.urlishttps://erikvancraddock.com.api.baseUrlishttp://erikvancraddock.com/api/v1.api.openapiUrlishttp://erikvancraddock.com/api/v1/openapi.json.SlugKit input: API requires HTTPSduring anonymous metadata discovery. This does not establish API-key validity.Acceptance criteria
Synced from todu comment by @todu on 2026-10-13T16:06:19.373Z
Investigation handoff
curl -sS https://erikvancraddock.com/api/v1/metareturns HTTP 200 over HTTPS without credentials.site.urluses HTTPS, butapi.baseUrlishttp://erikvancraddock.com/api/v1andapi.openapiUrlishttp://erikvancraddock.com/api/v1/openapi.json.Client::discoverincrates/rott-core/src/slugkit/client.rscallsEndpoint::advertisedincrates/rott-core/src/slugkit/endpoint.rs. Parsing that HTTP base triggersAPI requires HTTPS.Synced from todu comment by @todu on 2026-10-13T16:17:37.126Z
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.Synced from todu comment by @todu on 2026-10-13T16:15:58.162Z
Implementation update
slug-api@0.1.1generates API URLs from the request origin; the metadata route supplied the proxy-facing HTTP request even though the configured site URL uses HTTPS.9bccbbf).Synced from todu comment by @todu on 2026-10-13T16:27:48.042Z
Merge and release preparation
1eaeb72676d0ae69f1a73c4ad0b7d89c5e2b71cb; local main fast-forwarded and merged feature branches cleaned up.0.3.14. Clean/current main, absent release tag, and required Forgejo secret names were verified. Fresh npm ci/build/lint/full tests (475 passing) and Docker production-image health/homepage/version validation passed; generated files remain unchanged and the disposable validation container was removed.20261005T222145Z, HTTPS public origin and HSTS max-age 300. Flux timestamp image automation is active.Synced from todu comment by @todu on 2026-10-13T16:42:52.405Z
Production deployment verified
web-v0.3.14and its automatic production deployment after reviewing the source SHA, validations, restart/rollback plan and existing dependency advisories.1eaeb72676d0ae69f1a73c4ad0b7d89c5e2b71cb. Forgejo Actions job #80, Build and publish Docker image, completed successfully (4m55s): https://forge.caradoc.com/erik/erikvancraddock.com/actions.evcraddock/erikvancraddock-web:0.3.14,:20261013T163002Z, and:latest. Flux selected the timestamp and updated both app/init images automatically; no direct cluster changes were made.sha256:020f77874f85f951726de2551e6d0058241ffcced3df87b86b09ba82a8550fc4. Brief HTTP 503 responses occurred during the expected Recreate restart/ingress propagation; subsequent public checks succeeded./healthand/api/v1/healthreturn HTTP 200 and version0.3.14./api/v1/metareturns HTTP 200 withapi.baseUrl=https://erikvancraddock.com/api/v1andapi.openapiUrl=https://erikvancraddock.com/api/v1/openapi.json; software version is0.3.14.