-
-
Notifications
You must be signed in to change notification settings - Fork 126
feat: add SSL support #575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🚨 Warning: Approaching Monthly Automation Limit Monthly PRs automated: 248/250 Your organization has used over 90% of its monthly quota for gitStream automations. Once the quota is reached, new pull requests for this month will not trigger gitStream automations and will be marked as “Skipped”. To avoid interruptions, consider optimizing your automation usage or upgrading your plan by contacting LinearB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces SSL support for the server by adding new environment variables and updating the Fastify server configuration to optionally enable HTTPS.
- Added optional SSL_KEY_PATH and SSL_CERT_PATH to the environment schema
- Updated Fastify options to include HTTPS configuration when SSL files are available
- Updated documentation to reflect the new SSL-related environment variables
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/env.ts | Added optional SSL environment variables to the schema |
src/app.ts | Updated Fastify configuration to conditionally enable HTTPS |
docs/environment-variables.md | Updated documentation with new SSL-related environment variables |
Files not reviewed (1)
- .env.example: Language not supported
Comments suppressed due to low confidence (1)
src/app.ts:26
- Spreading a null value into an object literal can cause a runtime error; consider replacing 'null' with an empty object '{}'.
...(isHttps ? { https: { key: fs.readFileSync(SSL_KEY_PATH), cert: fs.readFileSync(SSL_CERT_PATH) } } : null),
@all-contributors add @neilenns on code |
I've put up a pull request to add @neilenns! 🎉 |
Addressed Copilot feedback. It's way less picky than Coderabbit.ai 🥰 |
OMG AUTOFORMAT NOOOOO. Standby. |
🥳 |
🎉 This PR is included in version 2.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In this PR:
This adds support for using SSL certificates and running the server at https://.
Key changes
SSL_KEY_PATH
andSSL_CERT_PATH
environment variables..env.example
HTTP2
to.env.example
since it was missed in feat: add HTTP/2 support via environment variable #565.As mentioned in the issue, I'm unable to get the tests to run successfully, however that happens even without these changes. I didn't add any tests for the new feature, env tests only look for mandatory ones. The thought of trying to add test certs to the repo to test https creation scared me off of adding any tests like that 😅.
A Docker image with these changes applied is published at ghcr.io/neilenns/turborepo-remote-cache:ssl. I've been running an instance of this for a few days and it's great and accessible via Cloudflare, if someone wants to try that I can provide a TURBO_TOKEN somehow outside of GitHub (Discord?).
Issues reference:
Fixes #572
Checklist:
pnpm lint
before submission?pnpm build
?pnpm test
?