-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support paths for SSL cert/key #13563
Comments
This would increase the size of the default Nitro server, and it would have to include FS access, which wouldn't work in non-Node environments. But you can easily implement this yourself. NITRO_SSL_CERT=$(cat server.crt) NITRO_SSL_KEY=$(cat server.key) node .output/server/index.mjs |
Yes, but it requires extract running command from scripts section of package.json or make it cross-platform in some way. Can dotenv dependency be updated to v15 for multiline value support at least? |
You can create a #!/bin/env/node
import fs from 'fs'
process.env.NITRO_SSL_CERT = fs.readFileSync('server.crt')
process.env.NITRO_SSL_KEY = fs.readFileSync('server.key')
await import('./.output/server/index.mjs') |
We shall improve documentation with unjs/nitro#85 |
Sorry to grave dig but I'm curious, could you clarify what you mean when you say non-Node environments? |
For example, on Cloudflare, Bun, Deno or Lagon. |
At this moment nuxt supports cert/key only as content (NITRO_SSL_CERT/NITRO_SSL_KEY env vars). Can support of paths be added too? It would improve DX with using .env file.
The text was updated successfully, but these errors were encountered: