I am trying to serve my PGP key from my website but the content-type in response is ‘application/pgp-signature’, I want it to be ‘text/plain’ so that it would be rendered in the browser like the way keybase does it.
key from my website: https://rohitgupta.xyz/pgpkey.asc
key from my keybase: https://keybase.io/rohitgupta/pgp_keys.asc
sharing current response (headers) from using curl
❯ curl https://rohitgupta.xyz/pgpkey.asc -I
HTTP/2 200
date: Sat, 19 Feb 2022 04:21:32 GMT
content-type: application/pgp-signature
cache-control: public, max-age=0, must-revalidate
etag: "c614904918541626f40f53da22997a04"
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=OLhpffoV%2BFnUIQFJdUjJqpYz7jZ6Bo9Dl8NfXN5ObsoML%2FSg%2Bp%2Ff6R0M4jWI6C1TCetgiozf63SPdTS2D9CbT9iwMvSXO4RYWigpOy6pZNBFpnvnW0d%2FK9pY6SjsHy5Hcg%3D%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
vary: Accept-Encoding
cf-cache-status: DYNAMIC
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
server: cloudflare
cf-ray: 6dfcb57bbdcbdcd6-SIN
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
On localhost as well getting the same issue,
❯ curl http:/localhost:1313/pgpkey.asc -I
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 7140
Content-Type: application/pgp-keys
Last-Modified: Tue, 15 Feb 2022 06:39:18 GMT
Date: Sat, 19 Feb 2022 04:52:00 GMT
How can I override the content-type to ‘text/plain’?
p.s. using github[dotcom]/adityatelange/hugo-PaperMod theme which is built on Hugo
