Current `auth.log` uses `fullpath` and `ip`, while `api_json.log` uses
`remote_ip` and `path` for the same fields. Let's standardize these
namings to make it easier for people working with the data.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66167
It was originally returning 302 when the rate limit kicks in, because
using the the correct status code makes it easier to track rate limiting
events
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/65974
* Limits raw requests to 300 per minute and per raw path.
* Add a new attribute to ApplicationSettings so user can change this
value on their instance.
* Uses Gitlab::ActionRateLimiter to limit the raw requests.
* Add a new method into ActionRateLimiter to log the event into auth.log
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/48717
This backports to ce a refactor of the shared example 'a controller that
can serve LFS files'.
The ee MR that contains the original refactor is
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13389
The reason for the refactor was mostly the removal of the outer context
as it didn't need to be there, and prevented let(:lfs_oid) from being
overwritten.
The shared example was also renamed to be more descriptive.
Updates specs to use new rails5 format.
The old format:
`get :show, { some: params }, { some: headers }`
The new format:
`get :show, params: { some: params }, headers: { some: headers }`
Do not display a 404, when a user tries to retrieve the raw content of
an LFS file (pointer) if the config option "lfs_enabled" is set to
false. Instead, display the LFS pointer file directly.
Add Content-Type header to fix a bug which IE can't show image in
markdown when the image is from raw.
modified: CHANGELOG
modified: app/controllers/projects/raw_controller.rb
modified: spec/controllers/projects/raw_controller_spec.rb