Skip to content

Make the truststore link a download - #435

Merged
reinkrul merged 1 commit into
masterfrom
certs-download-attribute
Oct 14, 2026
Merged

reinkrul merged 1 commit into
masterfrom
certs-download-attribute

Conversation

@reinkrul

Copy link
Copy Markdown
Member

Follow-up to #430.

GitHub Pages serves .pem as application/x-x509-ca-cert and offers no way to set headers, and headers() in Next.js does not apply to a static export. Some browsers (Firefox, for one) therefore offer to import the first certificate as a CA when the link on /certs is clicked.

This adds the download attribute to the bundle link on the page, so a click saves the file. The URL is unchanged; opening it directly, curl and wget behave as before.

Assisted by AI

GitHub Pages serves .pem as application/x-x509-ca-cert and cannot set
custom headers, so some browsers (Firefox, for one) offer to import the
first certificate as a CA instead of saving the file. The download
attribute makes a click on the page save the bundle instead. Opening the
URL directly, curl and wget are unaffected.

Assisted by AI

@stevenvegt stevenvegt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

or, otherwise make it a tar?

@reinkrul
reinkrul merged commit e74da8c into master Oct 14, 2026
4 checks passed
@reinkrul
reinkrul deleted the certs-download-attribute branch October 14, 2026 08:16
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