Skip to content

Verify project id presence in API requests

Vasilii Iakliushin requested to merge verify_project_id_in_api into master

What does this MR do and why?

Problem

It is possible to skip Grape id validation for http OPTIONS method.

Solution

Verify that id is present

How to set up and validate locally

Following request should not return a 500 error

curl -XOPTIONS "http://127.0.0.1:3000/api/v4/projects/{id}/repository/commits"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports