Skip to content

fix: prefer https for public swagger urls#60

Merged
gabedalmolin merged 1 commit intomainfrom
fix/swagger-public-https-preference
Mar 11, 2026
Merged

fix: prefer https for public swagger urls#60
gabedalmolin merged 1 commit intomainfrom
fix/swagger-public-https-preference

Conversation

@gabedalmolin
Copy link
Copy Markdown
Owner

Summary

Ensure the public Swagger spec advertises the deployed HTTPS origin so Swagger UI Try it out works correctly on Railway.

What changed

  • prefer HTTPS for non-local Swagger server URLs when the proxy reports an internal HTTP hop
  • keep localhost behaviour unchanged for local development
  • extend Swagger contract coverage for the public Railway host case

Validation

  • npm run lint
  • npm run typecheck
  • npm test
  • npm run test:integration when the change affects infrastructure-backed paths

Risks/Notes

  • this change only affects generated Swagger server metadata; runtime routing stays unchanged
  • after merge, redeploy the Railway service so /docs.json and /docs pick up the corrected public origin

@gabedalmolin gabedalmolin merged commit 3e3cb78 into main Mar 11, 2026
5 checks passed
@gabedalmolin gabedalmolin deleted the fix/swagger-public-https-preference branch March 11, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant