Skip to content

add optional ttlDays parameter#98

Open
noahw3 wants to merge 1 commit intovitejs:mainfrom
noahw3:main
Open

add optional ttlDays parameter#98
noahw3 wants to merge 1 commit intovitejs:mainfrom
noahw3:main

Conversation

@noahw3
Copy link

@noahw3 noahw3 commented Mar 10, 2026

Addresses #97

Adds a new optional parameter to allow the expiration date of the certificate to be customized past the default 30 days.

Happy to rename the parameter if there's a better name that we could use.

fsp.readFile(cachePath, 'utf8'),
])

if (Date.now() - stat.ctime.valueOf() > 30 * 24 * 60 * 60 * 1000) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default 30 days is also being used here to check its cache validity. It's think we might need to use import { X509Certificate } from 'node:crypto' to parse the cert and refactor this part to read the validity there instead.

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.

2 participants