Skip to content

cors: Enable CORS for user's SSH keys endpoint

  • Please check this box if this contribution uses AI-generated content as outlined in the GitLab DCO & CLA

What does this MR do and why?

cors: Enable CORS for user's SSH keys endpoint

This patch allows web browsers to query user's SSH keys, similarly to what Github allows.

Fixes: #428285 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist.

I've reviewed the docs and added unit tests and I hope the CI will tell me if I broke anything 😅

Screenshots or screen recordings

This is developer's feature for REST API calls, not a frontend change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Start the application.
  2. curl -i http://localhost/users/:id_or_username/keys
  3. The response should contain access-control-allow-origin: *
Edited by 🤖 GitLab Bot 🤖

Merge request reports