Skip to content

Support html content type #34

@danielemery

Description

@danielemery

Currently the main keys endpoint returns keys in a format that is suitable for use in an authorized_keys file without any parsing or modification.
This is a key features of the keys project and should be kept as the default behaviour.

However if the caller requests content-type: html they should instead receive the content in html. This will be a lot easier to view in the browser and can later support features like automatically copying keys to clipboard and clicking on tags to filter by them etc.

Attention should be given to still keeping the container as light as possible.

This issue can be completed in the following parts to help keep PRs small:

  • Force content-type to plain when a file extension is provided
  • Return html for the home page when requested
  • Return html for the ssh key list when requested
  • Return html for the pgp list when requested
  • Return html for individual pgp key when requested
  • Return html for known hosts when requested

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions